Hot answers tagged

43

Here's the complete answer, in case it helps others: To make packets with destinations 192.168.10.* use eth0, and all other packets use eth1: 1) View your current routing table ip route list One entry will be something like "default via 192.168.1.1" where 192.168.1.1 is your router (a.k.a. gateway) ip address. Remember the gateways for eth0 and eth1, as ...


31

The routes metric is to set preference among routes with equal specificity. That is true of routing in general (i.e. Cisco, Windows, etc). So the model works like: Find the most specific route (aka the longest prefix match*) If there are multiple routes with the same specificity, pick the one with the lowest administrative distance (This distinguishes ...


20

From what you describe, GOR seems to fit your needs. https://github.com/buger/gor/ "HTTP traffic replay in real-time. Replay traffic from production to staging and dev environnements." ?


19

You have not declared 192.168.36.0/23 link local, despite the fact you have an address assigned for it, no link-local route appears to be listed in your routes. 192.168.36.0 192.168.36.254 255.255.254.0 UG 0 0 0 eth0 192.168.36.0/23 via 192.168.36.254 dev eth0 Instead its declared 192.168.36.0/23 should be passed to the gateway 192....


18

To specify the interface in windows route command, you are supposed to use 'IF'... Uppercase letters, not lowercase. Also, where you are specifying you want to add a route to a single IP 192.168.0.6, you need to use a subnet mask of 255.255.255.255. The subnet mask of 255.255.255.255 specifies a single host. A subnet mask of 255.255.255.0 specifies 192.168....


11

It is impossible. TCP is statefull protocol. User end computer is involved in every step of connection and it will never answer to two separate servers trying to communicate to it. All you can do is collect all http request on webserver or some proxy and replay them. But that will not give and exact concurrency or traffic conditions of a live server.


10

This can be done by adding the following lines to dhcpd.conf: option rfc3442-classless-static-routes code 121 = array of integer 8; option rfc3442-classless-static-routes 24, 192, 168, 1, 192, 168, 0, 4; option ms-classless-static-routes code 249 = array of integer 8; option ms-classless-static-routes 24, 192, 168, 1, 192, 168, 0, 4; This distributes a ...


10

Subnet is defined by network and mask, e.g. network : 10.0.100.5 mask : /8 This means your subnet is : 10.0.100.5/8 Basically any valid IP within the 10.xxx.xxx.xxx family belongs to this subnet. Only one interface can be used to access hosts in this subnet. So, in your case, either eth0 or eth1 will be used. If other interfaces have IP addresses in same ...


10

Linux provides a number of tools for flexible routing selection. Single routing table In the simplest case, there is just one kernel routing table and no routes with the SRC attribute. This table contains a number of routes, which were placed there manually (ip route add), by the DHCP daemon, or by routing daemons. In this case, the kernel chooses: the ...


10

This should work:  route add 192.168.0.6 mask 255.255.255.0 192.168.0.254 If you want persistence: route -p add 192.168.0.6 mask 255.255.255.0 192.168.0.254 Not sure what the "if" was for, but try this for cost: route add 192.168.0.6 mask 255.255.255.0 192.168.0.254 metric 13


9

Am I doing something wrong or is the AWS VPC ec2 instances not able to reach any of the AWS managed services (s3/sns/sqs) without a public route to the Internet Gateway in the routetable? That's correct. If you need to use those services, your instances will need EIPs or public IPs or you'll need a NAT host in your VPC. A VPC is truly private, and it ...


9

You're leaving out a crucial piece of information, which is the subnet mask. You're making an incorrect assumption that these two hosts are in the same network/subnet based solely on the octet values without considering the subnet mask that each host is using. They could very well be in different networks. Think of a house address. If I told you that I ...


8

I know it's late, but I'd like to know what kind of VPN you're using. I've had this problem with Cisco Anyconnect VPN. Not seeing the same error as you, but the command would appear to execute, but the routing table would still look the same. I believe Cisco AnyConnect locks the routing table in some way so that it cannot be modified. If this isn't Cisco ...


8

For any network device which is not my default gateway, I usually set the default route flag to no: DEFROUTE="no" This seems to work without any issues for my servers with multiple network interfaces. If you then restart your network service or interfaces, you should be able to check the routes to see that this is actually working: /sbin/route -n ...


8

AWS has added VPC endpoints for various services, including S3 (2015), EC2 (2017), SNS (2018), and SQS (2018), which lets you use those services without public Internet access. New – VPC Endpoint for Amazon S3 (AWS Blog) New – AWS PrivateLink for AWS Services: Kinesis, Service Catalog, EC2 Systems Manager, Amazon EC2 APIs, and ELB APIs in your VPC (AWS Blog)...


8

The same company host doesn't means that they are on the same network architecture... so route and ping might be different if they are connected to different network elements (proxy, firewall, loadbalancers...). As they are on different subnetworks, they also might be in different Datacenters which means different physical location, so the ping time might be ...


8

First of all as some available on internet info explains "The local table is a special routing table maintained by the kernel". If you feeling really brave today you can even get some bits of information locally, here's how: man ip -- since that was the command you've been tinkering with it makes sense to expect its manual should have some hints on the ...


7

$ sudo route delete -net 0.0.0.0 -ifp ppp0 delete net 0.0.0.0 This is documented in route(8)


7

Teeproxy could be used to replicate traffic. The usage is really simple: ./teeproxy -l :80 -a localhost:9000 -b localhost:9001 a production server b testing server When you put a HAproxy (with roundrobin) before your webserver you can easily redirect 50% of your traffic to testing site: /------------------> production HAproxy / ...


7

I wrote a python program to wrap ipsec that installs iptables entries to allow docker containers to talk to the VPN tunnel: https://github.com/cbrichford/docker-ipsec Instead of doing: ipsec up You do: docker-ipsec up This script might need some work for use with the latest docker networking features, but worked with the old default docker0 bridge. If ...


6

The "default" routes are set based on the GATEWAY lines in your ifcfg-<interface> files. As Dom mentioned in his comment, if you remove the incorrect GATEWAY line, your routing table will be as you expect.


6

When Red Hat's networking scripts set multiple IPv6 addresses configured in /etc/sysconfig/network-scripts/ifcfg-*, for whatever reason, they are applied in reverse order, so that the last address listed in IPV6ADDR_SECONDARIES becomes the address used by default for outgoing connections. Reversing the order in which IPv6 addresses are listed is generally ...


5

route-nopull in the .ovpn file, or --route-nopull on the command line. You'll then have to set up the routes yourself, of course.


5

Stop using the netstat and route commands, they will just confuse you and they don't have the necessary functionality anyway. To view the basic IPv4 routing table: ip route To view a specific table: ip route list table test1 To view everything: ip route list table all And remember that these arguments can be abbreviated as long as they remain uniquely ...


5

If you are getting different traceroute results, it is because the routing is being handled differently. This could be because the hosts are not on the same network (as Paul's first comment under your question noted... I am agreeing with his comment... many companies these days are international, so being part of the same company doesn't necessarily mean ...


5

Shorter answer: Thanks for providing the actual IP addresses. This helps us see what you are seeing to an extent. And here is what I am seeing. 37.211.166.178 appears to be unreachable while 37.211.15.247 is fine. So the difference in ping times you initially saw could be due to an outage on that hosting provider’s network associated with that address. It ...


5

Yes, it's possible if there was tunneling involved and the two end points are in different networks. You won't see the hops between the two tunnel endpoints then, just the end points itself. It's not that uncommon.


5

Your issue isn't issue. In rule you use not only source address, but also input interface match. So, there are two ways to solve your "problem": Don't use the dev eth0 in the rule Add iif eth0 in the ip route get... command. The iif option allows you use non-local addresses in the ip route get command, so you can use something like: ip route get 4.3.2.1 ...


4

I had the exact same problem, and my solution was the easiest "if not silliest" thing you can think of. All I had to do to make the script work using Group Policy was to add entire command inside quotes ("), so the command route add 172.17.10.0 mask 255.255.0.0 172.16.12.100 -p should be "route add 172.17.10.0 mask 255.255.0.0 172.16.12.100 -p" Agree with ...


4

According to some documentation I found, Routes added by using the -p option are stored in the registry under the following key: HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tcpip \Parameters\PersistentRoutes Perhaps you could just use Group Policy Preferences to set the appropriate entries directly in the registry?


Only top voted, non community-wiki answers of a minimum length are eligible