Fail to add address into interface


Userlevel 1
Hello,

I am using Cumulux VX 3.1 under Virutal Box for testing now. I found that is fail to add IP address to interface.

Following is my interface setup and some debug output. Could you please advise me where is problem?

-------------------------
auto swp1
iface swp1
bridge-access 200
address 192.168.200.101/24

auto swp2
iface swp2
bridge-access 400

auto swp3
iface swp3
bridge-access 400

auto swp4
iface swp4

auto bridge
iface bridge
bridge-ports swp1 swp2 swp3 swp4
address 192.168.100.101/24
bridge-vlan-aware yes
bridge-allow-untagged yes
bridge-vids 1 200 400
bridge-pvid 1
bridge-stp on

------------------------
Could not find IP address is bind to swp1 or bridge

$ sudo ip route show
NULL

$ sudo ip address show
1: lo: 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: eth0: mtu 1500 qdisc pfifo_fast state DOWN group default qlen 1000
link/ether 08:00:27🇩🇪07:26 brd ff:ff:ff:ff:ff:ff
3: swp1: mtu 1500 qdisc pfifo_fast master bridge state UP group default qlen 1000
link/ether 08:00:27:c5:2d:40 brd ff:ff:ff:ff:ff:ff
4: swp2: mtu 1500 qdisc pfifo_fast master bridge state UP group default qlen 1000
link/ether 08:00:27:13:01:a4 brd ff:ff:ff:ff:ff:ff
5: swp3: mtu 1500 qdisc pfifo_fast master bridge state UP group default qlen 1000
link/ether 08:00:27:5c:43:32 brd ff:ff:ff:ff:ff:ff
6: swp4: mtu 1500 qdisc pfifo_fast master bridge state UP group default qlen 1000
link/ether 08:00:27:43:2a:1c brd ff:ff:ff:ff:ff:ff
7: bridge: mtu 1500 qdisc noqueue state UP group default
link/ether 08:00:27:13:01:a4 brd ff:ff:ff:ff:ff:ff

--------------------------
Thanks in advance

4 replies

Userlevel 4
You have layer 2 and layer 3 commands on the same port. Swp2 can either be a layer 2 port or a layer 3. Why do you have an IP address on it? Is that the gateway for VLAN 200? Make a SVI (Switch Virtual Interface) for 200 with a stanza for bridge.200.
Userlevel 4
The config Sean is referencing looks like this... ------------------------- auto swp1 iface swp1 bridge-access 200 auto swp2 iface swp2 bridge-access 400 auto swp3 iface swp3 bridge-access 400 auto swp4 iface swp4 auto bridge iface bridge bridge-ports swp1 swp2 swp3 swp4 address 192.168.100.101/24 bridge-vlan-aware yes bridge-allow-untagged yes bridge-vids 1 200 400 bridge-pvid 1 bridge-stp on auto bridge.200 iface bridge.200 address 192.168.200.101/24 ------------------------
Userlevel 3
Eric Pulvino wrote:

The config Sean is referencing looks like this... ------------------------- auto swp1 iface ...

A minor modification to Eric's configuration is that the "bridge" interface is also a layer 2 interface and thus cannot have an IP address assigned to it. So you need to create an SVI for the 192.168.100.101 address also. Something like this:

auto swp1
iface swp1
bridge-access 200

auto swp2
iface swp2
bridge-access 400

auto swp3
iface swp3
bridge-access 400

auto swp4
iface swp4

auto bridge
iface bridge
bridge-ports swp1 swp2 swp3 swp4
bridge-vlan-aware yes
bridge-allow-untagged yes
bridge-vids 1 200 400
bridge-pvid 1
bridge-stp on

auto bridge.1
iface bridge.1
address 192.168.100.101/24

auto bridge.200
iface bridge.200
address 192.168.200.101/24

Userlevel 1
Thank you! Now I have more clear concept.

Reply