Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # The loopback network interface
- auto lo
- iface lo inet loopback
- # Network A
- allow-hotplug eth0
- iface eth0 inet static
- address 10.1.10.100
- netmask 255.255.255.0
- gateway 10.1.10.1
- # Network B
- allow-hotplug eth1
- iface eth1 inet static
- address 192.168.100.1
- netmask 255.255.0.0
- gateway 127.0.0.1
- ip route add 192.168.50.0/24 via 10.1.10.100 dev eth0
- # This command makes things happy...
- $ ip route show
- default via 10.40.16.1 dev eth0
- 10.1.10.0/24 dev eth0 proto kernel scope link src 10.1.10.100
- 192.168.0.0/16 dev eth1 proto kernel scope link src 192.168.100.1
- 192.168.50.0/24 via 10.1.10.100 dev eth0
- #/etc/network/interfaces
- # Network A
- allow-hotplug eth0
- iface eth0 inet static
- address 10.1.10.100
- netmask 255.255.255.0
- gateway 10.1.10.1
- post-up route add -net 192.168.50.0 netmask 255.255.255.0 eth0
- post-down route del -net 192.168.50.0 netmask 255.255.255.0 eth0
- # Network B
- allow-hotplug eth1
- iface eth1 inet static
- address 192.168.100.1
- netmask 255.255.0.0
- gateway 127.0.0.1
- allow-hotplug eth0
- iface eth0 inet static
- address 10.1.10.100
- netmask 255.255.255.0
- gateway 10.1.10.1
- up ip route add 192.168.50.0/24 via 10.1.10.100 dev eth0
Add Comment
Please, Sign In to add comment