我的本地 IP 地址是:10.102.42.102,但我不明白该地址的其余部分。有人可以解释为什么吗?
root@HitHiFitHai:~# ip addr
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
inet 127.0.0.1/8 scope host lo
valid_lft forever preferred_lft forever
inet6 ::1/128 scope host
valid_lft forever preferred_lft forever
2: eth1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP group default qlen 1000
link/ether 78:24:af:36:06:cb brd ff:ff:ff:ff:ff:ff
inet 10.102.42.102/8 brd 10.255.255.255 scope global eth1
valid_lft forever preferred_lft forever
inet6 fe80::7a24:afff:fe36:6cb/64 scope link
valid_lft forever preferred_lft forever
3: virbr0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc noqueue state DOWN group default
link/ether 56:9c:21:33:37:c8 brd ff:ff:ff:ff:ff:ff
inet 192.168.122.1/24 brd 192.168.122.255 scope global virbr0
valid_lft forever preferred_lft forever
4: macvtap0@eth1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UNKNOWN group default qlen 500
link/ether 52:54:00:d3:46:e2 brd ff:ff:ff:ff:ff:ff
inet6 fe80::5054:ff:fed3:46e2/64 scope link
valid_lft forever preferred_lft forever
root@HitHiFitHai:~#
答案1
: virbr0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc noqueue state DOWN group default
link/ether 56:9c:21:33:37:c8 brd ff:ff:ff:ff:ff:ff
inet 192.168.122.1/24 brd 192.168.122.255 scope global virbr0
valid_lft forever preferred_lft forever
这是 libvirt 创建的“默认”桥接网络,用于为虚拟机提供网络(nat 如果提醒好的话) 192.168.122/1 是一个 C 类网络,具有 255.255.255.0 网络掩码(24 位)