Multiple IP addresses on one NIC and Multiple internet connections on one nic

From Edgar BV Wiki
Revision as of 10:26, 23 July 2010 by 192.168.0.39 (talk)
Jump to navigation Jump to search

isp isps nic ip alias ip aliasing multiple ips on one nic

Multiple Connections to the Internet / two isps on one nic

/etc/iproute2# cat rt_tables
#
# reserved values
#
255     local
254     main
253     default
0       unspec
#
# local
#
#1      inr.ruhep
82 sdsl
188 fibre


ip route add 82.94.91.64/28 dev eth0 src 82.94.91.77 table sdsl
ip route add default via 82.94.91.65 table sdsl
ip rule add from 82.94.91.64/28 table sdsl

ip route add 188.204.140.192/27 dev eth0 src 188.204.140.196 table fibre
ip route add default via 188.204.140.193 table fibre
ip rule add from 188.204.140.192/27 table fibre

to check:
ip rule show
ip route list table fibre
ip route list table sdsl

More information: http://linux-ip.net/html/adv-multi-internet.html#ex-adv-multi-internet-outbound-ip-

routing

http://www.policyrouting.org/iproute2.doc.html#ss9.5


ip address management with ip addr - http://linux-ip.net/html/tools-ip-address.html#tb-tools-ip-addr-scope


ip addr add 188.204.140.195/27 brd 188.204.140.223 dev eth1 label eth1:1


A lot on policy routing - http://www.policyrouting.org/iproute2.doc.html#ss9.5


ip link list - shows the physical devices

ip addr list - shows the adressees the links have

ip addr show dev eth0


Basic ip route - http://linux-ip.net/html/tools-ip-route.html

ip route list - like netstat -rn

/etc/iproute2/rt_tables - contains the routing tables

ip route show table local / main - shows the specified table

ip -s route show cache

ip route flush cache

NB - ip route flush kills all the routing tables!!!


More on routing tables - http://linux-ip.net/html/routing-tables.html

eth0 82.94.91.77

eth0:0 188.204.140.196/27