Hi,

Can you please advise how can I revert the things that OVS did WITHOUT
using the OVS commands, when OVS processes are not running?

I am trying to "move" the IP address from the NIC (eth0) to the OVS
bridge interface. I am doing the following steps:
1. Create OVS bridge "brcnv".
2. Create OVS internal port "port0" and configure it as L3 interface
(configure DHCP client on it)
3. Create OVS port "port1" and attach the NIC interface "eth0" to that port
4. Assign the port "port1" to the bridge "brcnv".
5. Bring up the L3 interface of OVS.
6. Bring down the L3 interface "eth0".


I am using "nmcli" commands in order to configure the previous steps,
following are the commands:
nmcli conn add type ovs-bridge conn.interface brcnv
nmcli conn add type ovs-port conn.interface brcnv-port master brcnv
nmcli conn add type ovs-interface conn.id brcnv-iface conn.interface
brcnv master brcnv-port ipv4.method auto connection.autoconnect no
nmcli conn add type ovs-port conn.interface port1 master brcnv
nmcli conn add type ethernet conn.interface eth0 master port1
nmcli conn down eth0
nmcli conn up brcnv-iface
nmcli conn mode brcnv-iface connection.autoconnect yes
nmcli conn mode eth0 connection.autoconnect no

Here are the relevant outputs:

[root@localhost ~]# ovs-vsctl show
af1e42a3-04e6-48fd-9545-8271a1f0bbfe
    Bridge brcnv
        Port "port1"
            Interface "eth0"
                type: system
        Port brcnv-port
            Interface brcnv
                type: internal
    ovs_version: "2.9.2"

[root@localhost ~]# nmcli conn
NAME                  UUID                                  TYPE
    DEVICE
brcnv-iface           c27717db-2f24-49a6-a3af-3b524b1cb990
ovs-interface  brcnv
ovs-bridge-brcnv      e8d57b84-3cd3-4a17-b634-608c1dd61ba4  ovs-bridge
    brcnv
ovs-slave-brcnv-port  e0fc4f3f-5426-4fc6-8f24-dd051e1bf63d  ovs-port
    brcnv-port
ovs-slave-eth0        4af777a7-4bd4-4d68-9f33-e3b45e7ae46d  ethernet
    eth0
ovs-slave-port1       b53b74d4-d3f6-4eac-be28-a9c4737a8dfd  ovs-port
    port1
eth0                  3e06d59a-92c5-4ea6-9ec6-ce416df95646  ethernet
    --

[root@localhost ~]# ip addr
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN
group default qlen 1000
    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: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast
master ovs-system state UP group default qlen 1000
    link/ether 52:54:00:90:1f:4f brd ff:ff:ff:ff:ff:ff
3: ovs-system: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN
group default qlen 1000
    link/ether 42:03:50:51:f7:e6 brd ff:ff:ff:ff:ff:ff
4: brcnv: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue
state UNKNOWN group default qlen 1000
    link/ether 3e:4f:21:94:bd:43 brd ff:ff:ff:ff:ff:ff
    inet 192.168.122.84/24 brd 192.168.122.255 scope global
noprefixroute dynamic brcnv
       valid_lft 3264sec preferred_lft 3264sec
    inet6 fe80::8ea4:f24c:119f:a9b5/64 scope link noprefixroute
       valid_lft forever preferred_lft forever

I am using VM with one NIC, OS is Centos 7.7.1908
ovs-vsctl (Open vSwitch) 2.9.2
DB Schema 7.15.1


My issue is that when I stop the openvswitch processes using
"systemctl stop openvswitch" I cannot restore the connectivity after
reverting the IP back to "eth0". I have tried both "nmcli" and "ip"
commands:

systemctl stop openvswitch
ip addr flush dev brcnv
ip link set dev brcnv down
ip link set dev eth0 promisc off
ip addr add 192.168.122.70/24 dev eth0
ip link set dev eth0 up
ping 192.168.122.1 (IP of virbr0 on the host OS, no response)

OR

nmcli conn down brcnv-iface
nmcli conn up eth0 (eth0 got IP address from DHCP)
ping 192.168.122.1 (no response)

This issue is solved only when I start the OVS processes and delete
the brcnv using "ovs-vsctl del-br brcnv".


Please advise.

TIA and BR,
Igor
_______________________________________________
discuss mailing list
[email protected]
https://mail.openvswitch.org/mailman/listinfo/ovs-discuss

Reply via email to