Get the App
SLTechnology News&Howtos  ›  Servers  › 

Bridge setting after reboot of parent machine in openstack

Shulou Source: shulou.com Published: 2022-06-02 13:28:16 10月02日 Update

# requirements: after the host of the migration environment is restarted, the bridge needs to be manually configured.

After restarting, the figure is as follows:

[root@host-10-12398-218] # ifconfigeth2 Link encap:Ethernet HWaddr 00:E0:81:E6:6C:3B inet addr:10.123.98.218 Bcast:10.123.98.255 Mask:255.255.255.192 UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:5374 errors:0 dropped:0 overruns:0 frame:0 TX packets:4010 errors:0 dropped:0 overruns:0 carrier: 0 collisions:0 txqueuelen:1000 RX bytes:584689 (570.9 KiB) TX bytes:575491 (562.0 KiB) Memory:f7900000-f7920000 lo Link encap:Local Loopback inet addr:127.0.0.1 Mask:255.0.0.0 UP LOOPBACK RUNNING MTU:65536 Metric:1 RX packets:163 errors:0 dropped:0 overruns:0 frame:0 TX packets: 163errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:0 RX bytes:167824 (163.8 KiB) TX bytes:167824 (163.8 KiB)

You can see more about the network.

[root@host-10-12398-218 ~] # ip A1: lo: mtu 65536 qdisc noqueue state UNKNOWN link/loopback 00lo 00lo 00lo 0000lo 0000VlV 0000lo 0000VlV 0000VlV 0000VlV 0000VOLO 00 inet 127.0.0.1 8 scope host lo valid_lft forever preferred_lft forever2: eth0: mtu 1500 qdisc noop state DOWN qlen 1000 link/ether 00:e0:81:e6:6c:3a brd ff:ff:ff:ff:ff:ff3: Eth2: mtu 1500 qdisc mq state UP qlen 1000 link/ether 00:e0:81:e6:6c:3b brd ff:ff:ff:ff:ff:ff inet 10.123.98.218/26 brd 10.123.98.255 scope global eth2 valid_lft forever preferred_lft forever

View current bridge information

[root@host-10-12398-218] # brctl showbridge name bridge id STP enabled interfaces

Here you can compare with other normal parent networks in the same network area, as follows:

[root@host-10-12398-213] # ifconfig eth2 Link encap:Ethernet HWaddr 00:E0:81:E6:6B:BB # Real Network Card inet addr:10.123.98.213 Bcast:10.123.98.255 Mask:255.255.255.192 UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:1758313140 errors:0 dropped:0 overruns:0 frame:0 TX packets:1129411318 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:301531883354 (280.8 GiB) TX bytes:184138656905 (171.4 GiB) Memory:f7900000-f7920000 eth2.3 Link encap:Ethernet HWaddr 00:E0:81:E6:6B:BB # added bridge UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:542897803 errors:0 dropped:0 overruns:0 frame:0 TX packets:114650555 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:0 RX bytes:33814358483 (31.4 GiB) TX bytes:22081251843 (20.5 GiB) eucabr3 Link encap:Ethernet HWaddr 00:E0:81:E6:6B:BB # # added Bridge UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:439499091 errors:0 dropped:0 overruns:0 frame:0 TX packets:0 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:0 RX bytes:23134270803 (21.5GiB) TX bytes:0 (0.0b) lo Link encap:Local Loopback Inet addr:127.0.0.1 Mask:255.0.0.0 UP LOOPBACK RUNNING MTU:65536 Metric:1 RX packets:158403403 errors:0 dropped:0 overruns:0 frame:0 TX packets:158403403 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:0 RX bytes:11455266584 (10.6 GiB) TX bytes:11455266584 (10.6 GiB) vnet0 Link encap:Ethernet HWaddr FE: 54:00:7E:8B:25 # Virtual Machine Network Card UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:0 errors:0 dropped:0 overruns:0 frame:0 TX packets:256 errors:0 dropped:439498799 overruns:0 carrier:0 collisions:0 txqueuelen:500 RX bytes:0 (0.0b) TX bytes:15360 (15.0 KiB) Vnet1 Link encap:Ethernet HWaddr FE:0D:EB:DA:A9:43 # Virtual Machine Network Card UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:114650555 errors:0 dropped:0 overruns:0 frame:0 TX packets:542897475 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:500 RX bytes:22081251843 (20.5 GiB) TX bytes:41255620926 (38.4 GiB)

1. Set the subnet card eth2.3 # vconfig add eth2 3

2. Create a bridge # brctl addbr eucabr3

3. Add the eht1.3 port to the bridge eucabr3 # brctl addif eucabr3 eth2.3

4. Launch the subnet card and bridge ifconfig eth2.3 up;ifconfig eucabe3 up

[root@host-10-12398-218] # ifconfigeth2 Link encap:Ethernet HWaddr 00:E0:81:E6:6C:3B inet addr:10.123.98.218 Bcast:10.123.98.255 Mask:255.255.255.192 UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:20978 errors:0 dropped:0 overruns:0 frame:0 TX packets:8223 errors:0 dropped:0 overruns:0 carrier: 0 collisions:0 txqueuelen:1000 RX bytes:1682834 (1.6 MiB) TX bytes:1258355 (1.2 MiB) Memory:f7900000-f7920000 eth2.3 Link encap:Ethernet HWaddr 00:E0:81:E6:6C:3B UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:8419 errors:0 dropped:0 overruns:0 frame:0 TX packets:0 errors:0 dropped:0 overruns:0 carrier 0 collisions:0 txqueuelen:0 RX bytes:394168 (384.9 KiB) TX bytes:0 (0.0b) eucabr3 Link encap:Ethernet HWaddr 00:E0:81:E6:6C:3B UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:1505 errors:0 dropped:0 overruns:0 frame:0 TX packets:0 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen: 0 RX bytes:71176 (69.5KiB) TX bytes:0 (0.0b) lo Link encap:Local Loopback inet addr:127.0.0.1 Mask:255.0.0.0 UP LOOPBACK RUNNING MTU:65536 Metric:1 RX packets:221 errors:0 dropped:0 overruns:0 frame:0 TX packets:221 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 Txqueuelen:0 RX bytes:172856 (168.8 KiB) TX bytes:172856 (168.8 KiB)

View the status of the virtual machine on the parent machine and start the virtual machine in the shutdown state

# virsh list Id Name State--- [root@host-10-12398-218] # virsh list-- all Id Name State----i-C70462A7 shut off-i-D69199A5 shut off [root @ host-10-12398-218 ~] # vitsh start i-C70462A7Hey! No command 'vitsh' found Did you mean 'virsh'? [root@host-10-12398-218] # virsh start i-C70462A7Domain i-C70462A7 start [root @ host-10-12398-218] # virsh dominfo i-C70462A7Id: 12Name: i-C70462A7UUID: 5452a99f-9695-46d8-b7b6-92658d1e85d8OS Type: hvmState: runningCPU (s): 4CPU time: 4.9sMax memory: 3670016 KiBUsed Memory: 3670016 KiBPersistent: yesAutostart: disableManaged save: noSecurity model: noneSecurity DOI: 0 [root@host-10-12398-218] # virsh list-- all Id Name State--- 12 i-C70462A7 Running-i-D69199A5 shut off-

If the virtual machine starts normally, it means that the host bridge is set up normally.

# ping 10.123.7.87PING 10.123.7.87 (10.123.7.87) 56 (84) bytes of data.64 bytes from 10.123.7.87: icmp_seq=1 ttl=63 time=0.312 ms64 bytes from 10.123.7.87: icmp_seq=2 ttl=63 time=0.267 ms

Tags: Bridge Nic parent network status information area situation manual more environment port requirements configuration Apple Docker Huawei Linux macOS MariaDB Microsoft MySQL NVidia OPPO Reno Xiaomi Docker MariaDB Apple macOS