Kod: Zaznacz cały
auto tap0
iface tap0 inet manual
pre-up ip tuntap add tap0 mode tap user root
pre-up ip addr add 10.1.0.1/24 dev tap0
up ip link set dev tap1 up
post-down ip link del dev tap0
Kod: Zaznacz cały
PING 8.8.8.8 (8.8.8.8) from 10.1.0.1 tap0: 56(84) bytes of data.
From 10.1.0.1 icmp_seq=1 Destination Host Unreachable
--- 8.8.8.8 ping statistics ---
1 packets transmitted, 0 received, +1 errors, 100% packet loss, time 0ms
Dodatkowe informacje:
Kod: Zaznacz cały
$ ip a show tap0
4: tap0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc pfifo_fast state DOWN group default qlen 500
link/ether ce:91:62:fe:9c:9c brd ff:ff:ff:ff:ff:ff
inet 10.1.0.1/24 scope global tap0
valid_lft forever preferred_lft forever
$ ip r
default via 10.0.2.1 dev eth0
10.0.2.0/24 dev eth0 proto kernel scope link src 10.0.2.15
10.1.0.0/24 dev tap0 proto kernel scope link src 10.1.0.1
172.17.0.0/16 dev docker0 proto kernel scope link src 172.17.0.1
192.168.1.128/25 dev br0 proto kernel scope link src 192.168.1.129
192.168.56.0/24 dev eth1 proto kernel scope link src 192.168.56.101
$ route -n
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
0.0.0.0 10.0.2.1 0.0.0.0 UG 0 0 0 eth0
10.0.2.0 0.0.0.0 255.255.255.0 U 0 0 0 eth0
10.1.0.0 0.0.0.0 255.255.255.0 U 0 0 0 tap0
172.17.0.0 0.0.0.0 255.255.0.0 U 0 0 0 docker0
192.168.1.128 0.0.0.0 255.255.255.128 U 0 0 0 br0
192.168.56.0 0.0.0.0 255.255.255.0 U 0 0 0 eth1