I am looking a L2/L3 switch spec. which says it supports 256 Router Legs and maximum of 32 Static routes.
Can somebody explain with an example, what is the difference between router leg and static route?
I am looking a L2/L3 switch spec. which says it supports 256 Router Legs and maximum of 32 Static routes.
Can somebody explain with an example, what is the difference between router leg and static route?
By "router leg" they mean a (directly) connected route (and use a strange way of putting it).
What is a connected route compared to a static route?
A connected route is a route that points to an interface. For example if you configure 10.0.0.1/24
on (ethernet) interface Gi0/1
the directly connected route (the "router leg") is 10.0.0.0/24
.
If the router wants to send a packet to a host in the 10.0.0.0/24
network it will do a L2 (Layer2) lookup (ARP for IPv4, ND for IPv6) on the Gi0/1
interface to find the MAC address of the host. It will then send the packet to the MAC address.
One-liner: Connected routes point to an interface, next-hop for packet will be resolved at L2 by ARP/ND on the respective interface.
A static route points to an IP address. For example you could have route 10.0.0.0/24
pointing to 10.0.2.1
. The router will send packets for hosts in the 10.0.0.0/24
network to 10.0.2.1
.
For this to work 10.0.2.1
itself must be part of a connected route so that the router can find the right L2 next-hop for the packets.
One-liner: Static routes point to an IP next-hop. The IP next-hop itself will be resolved by L2 lookup on the interface the connected route for the next-hop points to.
One thing you should ask your vendor: If the specs are for IPv4 and for IPv6, and if not how many IPv6 routes you can have for each of the different types.
In addition, static route can also point to a local interface.
1- Static with next-hop as a local interface:
Example: ip route 10.0.0.0 255.255.255.0 G0/1
For every destination in 10.0.0.0/24
, the router will consider it directly connected to G0/1
and will send an ARP request, and will add an ARP entry when responded.
2- Static with next-hope as IP
Example: ip route 10.0.0.0 255.255.255.0 10.0.2.1
Now, the router does not need to send an ARP request for every destination in 10.0.0.0/24
, the router will use the L2 address of next-hop (will resolve it once and then re-use ARP cache)
Difference:
"interface as next-hop" will build huge arp table and its not recommended if local interface (G0/1
) connects to a huge network like internet provider or ISP gateway router. ARP table will keep increasing for every new destination on the internet and will eat up all the memory to a chocking point. Its ok to use on a p2p connection though. And it also requires proxy-arp to be enabled on the gateway router.
"IP as next-hop" on the other hand uses a single ARP entry, thats is for the gateway IP (10.0.2.1
)
Router leg means directly connected interface or L3 interface for example
Router#(config)# interface 0/1 Router(config)#ip address 192.168.1.1 255.255.255.0 Router(config)#shutdown
This is called one of router leg configuration
Static route is route configured on switch to reach destination network
For example
Ip route 192.168.11.0 255.255.255.0 192.168.1.2 /this is static route/