Basic Routing concept with Cumulus


Userlevel 1
Hello,

I just learning Cumulus and there are question about basic routing issue with Cumulus.

1. When I config the port as a L3 like. Is it support 2nd IP address for each SWP or SWP.sub-interface?

2. I would like to config Cumulus as a default gateway for my hosts. What is the next hop will forward by Cumulus? Is it just following default gateway same as eth0?

3. Is it I need further config the inter-subnet routing within same Cumulus when I config multi L3 iP address in different point? or I just blind them into same bridge to solve the problem?

4. Does Cumulus support PBR (policy base routing)? Any manual for reference?

Thanks!

4 replies

Userlevel 5
1). You can configure as many ipv4 ipv6 addresses as you like on a swp. 2). This is very common. You would probably want a default gateway that is the SVI in each VLAN. Then a generic default route that can be used across all VLANs. 3). IP addresses exist at layer3 and bridges exist at layer2, so ip addresses do not need to be in the same bridge to converse with one another for two layer 3 interfaces. 4). There is some limited support for this functionality, we don't really call it PBR in Cumulus. Linux would refer to this idea as packet mangling. We have some info on what kind of mangling operations we can perform in our ACL documentation --> https://docs.cumulusnetworks.com/display/DOCS/Netfilter+-+ACLs#Netfilter-ACLs-SettingDSCPonTransitTraffic
Userlevel 1
Hello,

Thank you and now I have some idea but still have question.

1. I could not access 2nd IP in each swp or swp.220. Following is my config and output from ifconfig. Could you please advise?

----------------------
auto swp2
iface swp2
address 192.168.99.1/25
address 192.168.99.130/25

auto swp2.220
iface swp2.220
address 192.168.220.1/25
address 192.168.220.130/25

--------------------------
Could you see 192.168.99.130 and 192.168.220.130 is active

#ifconfig
swp2 Link encap:Ethernet HWaddr 00:50:56:b0:41:71
inet addr:192.168.99.1 Bcast:0.0.0.0 Mask:255.255.255.128
inet6 addr: fe80::250:56ff:feb0:4171/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:6563 errors:0 dropped:0 overruns:0 frame:0
TX packets:21 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:405432 (395.9 KiB) TX bytes:2736 (2.6 KiB)

swp2.220 Link encap:Ethernet HWaddr 00:50:56:b0:41:71
inet addr:192.168.220.1 Bcast:0.0.0.0 Mask:255.255.255.128
inet6 addr: fe80::250:56ff:feb0:4171/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:8 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:0 (0.0 😎 TX bytes:808 (808.0 😎
----------------------

2. I read the manual about SVI and it should which like following

auto bridge-A
iface bridge-A
address 192.168.2.1/24
address 2001:db8:2::1/64
bridge-ports swp1 swp2
bridge-stp on

But it looks there are no default gateway setup parameters when I tried.

What should I config?

Also, eth0 I think should be same as OOB? That I think they should be individual routing?

4. Thanks for your manual. However, it looks that including what I want to do. Is it support that is limited you mentioned?

Example:

Route IP source 192.168.2.0/24 to next-hop 192.168.111.1
and all other rest will keep using default gateway

Thanks!

Userlevel 4

1. I could not access 2nd IP in each swp or swp.220. Following is my config and output from ifconfig. Could you please advise?

ifconfig was deprecated in 2001 for *nix systems despite being used often. This is one of the drawbacks of ifconfig. Use the command 'ip addr show' instead. You will see both addresses.

But it looks there are no default gateway setup parameters when I tried.

It sounds like you want a default gateway. You can only have 1 default gateway per routing instance. Use the word 'gateway' under the interface like this->

auto bridge-A
iface bridge-A
address 192.168.2.1/24
address 2001:db8:2::1/64
gateway 192.168.2.X <- IPv4 gateway, change X
gateway 2001:db8:2::X <-IPv6 gateway, change X
bridge-ports swp1 swp2
bridge-stp on

Route IP source 192.168.2.0/24 to next-hop 192.168.111.1

You can't do 'source routing' this is PBR and not supported by Cumulus Linux. What you could do is put all ports that are hooked up to the 192.168.2.0/24 in their own VRF instance so they only have one possible route, and that route is 192.168.111.1. Draw a diagram if you have follow-up questions so we know exactly what you are trying to do.
Userlevel 1
Hello,

Further test I am experience now about default route with using bridge idea. Please check my interfaces setup in below:

------------

auto swp2
iface swp2
address 192.168.99.1/25
address 192.168.99.130/25

auto swp2.220
iface swp2.220
address 192.168.220.1/25
address 192.168.220.130/25

auto bridge-A
iface bridge-A
gateway 192.168.98.1/24
bridge-ports swp2
bridge-vids 220
bridge-pvid 1
bridge-stp on

---------------

After bring up all interfaces. I find swp2 did not assigned any IP

----
4: swp2: mtu 1500 qdisc pfifo_fast master bridge-A state UP group default qlen 1000
link/ether 00:50:56:b0:41:71 brd ff:ff:ff:ff:ff:ff
-----

swp2.220 still assigned IP. But the bridge-A did not have route there

---
# sudo ip route show
default via 188.55.77.1 dev eth0
192.168.220.0/25 dev swp2.220 proto kernel scope link src 192.168.220.1
192.168.220.128/25 dev swp2.220 proto kernel scope link src 192.168.220.130
188.55.77.0/25 dev eth0 proto kernel scope link src 188.55.77.32
-----

My question now is require to group

192.168.99.0/25
192.168.99.128/25
192.168.220.0/25
192.168.220.128/25

to the next-hop 192.168.98.1

What should I procedure a correct config?

Thanks!

Reply