LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Networking (https://www.linuxquestions.org/questions/linux-networking-3/)
-   -   iproute2 rounting (https://www.linuxquestions.org/questions/linux-networking-3/iproute2-rounting-191806/)

sqn 06-10-2004 02:19 AM

iproute2 rounting
 
Hi all,

My ISP uses iproute to route me out on the internet. The problem is that i need mo make a bandwith measurmnet and i can make a trafic log only on one IP, the others are routed from the ISP to me and i use postrouting and preroutind dnat and snat to use them.

How can i make so i can log the others ip's. here is how the ip is set up


ip addr add zzz.yyy.xxx.185 peer zzz.yyy.xxx.184 dev eth0
ip route add default via 193.230.207.184 dev eth0

i do have another 3 ip's and i can;t quite use them or to log trafic on them

Thx in advance

peter_robb 06-14-2004 02:26 PM

The usual way is to add the extra ip numbers as virtual interfaces..
eg
xx.xx.xxx.231 eth0:1
xx.xx.xxx.232 eth0:2
xx.xx.xxx.233 eth0:3

then you can refer to them differently with iptables and iproute2..

They all have the same MAC address, unless you wish to make that different for each as well..
eg
ifconfig eth0:1 xx.xx.xxx.231 hw ether 0c:23:44:5e:ff:90 ...


All times are GMT -5. The time now is 01:45 AM.