[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-discuss] How to convert from ifconfig to ip ?
From: |
Pierre Couderc |
Subject: |
Re: [Qemu-discuss] How to convert from ifconfig to ip ? |
Date: |
Fri, 27 Jul 2018 09:23:36 +0200 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.9.1 |
Thank you very much, Pascal.
When I compare what is working for you :
4: tap0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc fq_codel
state DOWN group default qlen 1000
link/ether 7e:89:46:3d:b0:d4 brd ff:ff:ff:ff:ff:ff
inet 192.168.1.1/24 <http://192.168.1.1/24> scope global tap0
valid_lft forever preferred_lft forever
what is workin for me (XP VM):
4: tap0: <NO-CARRIER,BROADCAST,MULTICAST,DYNAMIC,UP> mtu 1500 qdisc
pfifo_fast state DOWN group default qlen 1000
link/ether 7e:2f:8b:e5:a3:1e brd ff:ff:ff:ff:ff:ff
inet 192.168.164.1/24 brd 192.168.164.255 scope global tap0
valid_lft forever preferred_lft forever
andd what is *NOT* working for me :
3: tap0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc pfifo_fast
state DOWN group default qlen 1000
link/ether 3a:07:06:79:0a:c5 brd ff:ff:ff:ff:ff:ff
inet 192.168.164.1/32 scope global tap0
valid_lft forever preferred_lft forever
inet6 fec0::3807:6ff:fe79:ac5/64 scope site deprecated mngtmpaddr
dynamic
valid_lft 36345sec preferred_lft 0sec
inet6 fe80::3807:6ff:fe79:ac5/64 scope link
valid_lft forever preferred_lft forever
the difference seems to be the presence of IPV6 in 'bad' case...
On 07/27/2018 09:02 AM, Pascal wrote:
hello, this is working for me :
# ip link show tap0
Device "tap0" does not exist.
# ip tuntap add mode tap dev tap0 group kvm
# ip link show tap0
4: tap0: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN mode
DEFAULT group default qlen 1000
link/ether 7e:89:46:3d:b0:d4 brd ff:ff:ff:ff:ff:ff
# ip link set dev tap0 up
# ip link show tap0
4: tap0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc fq_codel
state DOWN mode DEFAULT group default qlen 1000
link/ether 7e:89:46:3d:b0:d4 brd ff:ff:ff:ff:ff:ff
# ip addr add 192.168.1.1/24 <http://192.168.1.1/24> dev tap0
# ip addr show tap0
4: tap0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc fq_codel
state DOWN group default qlen 1000
link/ether 7e:89:46:3d:b0:d4 brd ff:ff:ff:ff:ff:ff
inet 192.168.1.1/24 <http://192.168.1.1/24> scope global tap0
valid_lft forever preferred_lft forever
# ping -c 4 192.168.1.1
PING 192.168.1.1 (192.168.1.1) 56(84) bytes of data.
64 bytes from 192.168.1.1 <http://192.168.1.1>: icmp_seq=1 ttl=64
time=0.021 ms
64 bytes from 192.168.1.1 <http://192.168.1.1>: icmp_seq=2 ttl=64
time=0.015 ms
64 bytes from 192.168.1.1 <http://192.168.1.1>: icmp_seq=3 ttl=64
time=0.019 ms
64 bytes from 192.168.1.1 <http://192.168.1.1>: icmp_seq=4 ttl=64
time=0.015 ms
--- 192.168.1.1 ping statistics ---
4 packets transmitted, 4 received, 0% packet loss, time 3107ms
rtt min/avg/max/mdev = 0.015/0.017/0.021/0.005 ms
regards.
2018-07-26 19:19 GMT+02:00 Pierre Couderc <address@hidden
<mailto:address@hidden>>:
My bridge for qemu is started with :
sysctl net.ipv4.ip_forward=1
tunctl -t tap0 -u nous
ifconfig tap0 192.168.164.1 up
iptables...
I have replaced ipconfig line with ip:
ip link set tap0 up
ip address add 192.168.164.1 dev tap0
but it fails (no ping 192.168.164.1) in the vm.
What do I miss ?
Thanks
PC