sudo ifconfig eth0:0 172.16.0.1 up
sudo ifconfig eth0:1 172.16.0.2 up
takze to vyzera takto eth0 Link encap:Ethernet HWaddr 00:26:9e:80:b0:22
inet addr:172.16.0.1 Bcast:172.16.255.255 Mask:255.255.0.0
UP BROADCAST MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)
Interrupt:46 Base address:0xe000
eth0:0 Link encap:Ethernet HWaddr 00:26:9e:80:b0:22
inet addr:172.16.0.2 Bcast:172.16.255.255 Mask:255.255.0.0
UP BROADCAST MULTICAST MTU:1500 Metric:1
Interrupt:46 Base address:0xe000
eth0:1 Link encap:Ethernet HWaddr 00:26:9e:80:b0:22
inet addr:172.16.0.3 Bcast:172.16.255.255 Mask:255.255.0.0
UP BROADCAST MULTICAST MTU:1500 Metric:1
Interrupt:46 Base address:0xe000
ping -b 172.16.255.255
tak to bude vracat pingy z tych aliasovych sietoviek.sudo ifconfig eth0:0 172.16.0.2 up
sudo ifconfig eth0:1 172.16.0.3 up
# sysctl -a | grep -i icmp_echo
net.ipv4.icmp_echo_ignore_all = 0
net.ipv4.icmp_echo_ignore_broadcasts = 1
echo 0 > /proc/sys/net/ipv4/icmp_echo_ignore_broadcasts
net.ipv4.icmp_echo_ignore_broadcasts = 1
ifconfig eth0 192.168.0.1 netmask 255.255.255.0 up
ifconfig eth0:0 192.168.0.2 netmask 255.255.255.0 up
ifconfig eth0:1 192.168.0.3 netmask 255.255.255.0 up
route add -host 192.168.0.1 dev eth0
route add -host 192.168.0.2 dev eth0:0
route add -host 192.168.0.3 dev eth0:1
route add -net 192.168.0.0/24 gw 192.168.0.1
ping -b 192.168.0.255
WARNING: pinging broadcast address
PING 192.168.0.255 (192.168.0.255) 56(84) bytes of data.
64 bytes from 192.168.0.1: icmp_req=1 ttl=64 time=0.047 ms
64 bytes from 192.168.0.1: icmp_req=2 ttl=64 time=0.044 ms
64 bytes from 192.168.0.1: icmp_req=3 ttl=64 time=0.044 ms
64 bytes from 192.168.0.1: icmp_req=4 ttl=64 time=0.048 ms
^C
--- 192.168.0.255 ping statistics ---
4 packets transmitted, 4 received, 0% packet loss, time 2997ms
rtt min/avg/max/mdev = 0.044/0.045/0.048/0.008 ms
ping -I 192.168.0.1 192.168.0.2
sudo tcpdump -i eth0:0 -p icmp
tcpdump: verbose output suppressed, use -v or -vv for full protocol decode
listening on eth0:0, link-type EN10MB (Ethernet), capture size 65535 bytes