3

I'm a newbie to Cisco Equipment and IOS, but got myself a Cisco 2811 and have been playing with it and getting to grips with the basics quite happily. One problem i'm having is trying to get two interfaces to be on the same network. I have read in many places that it can't be done, or it can be done with a bridge group, but as a newbie I still don't get it.

What I want to achieve is to have one network on two interfaces: FastEthernet0/0 and FastEthernet0/1 on network 192.168.0.0 both with the router at 192.168.0.1

From what I can pick out I think this is what I need to do, but i'm not sure how:

  • Create a virtual bridge interface
  • Assign the virtual bridge interface the IP address 192.168.0.1 with subnet mask 255.255.255.0
  • Assign FastEthernet0/0 and FastEthernet0/1 to the virtual bridge interface

Once I've done that, I can then create a DHCP pool pointing to the network 192.168.0.1 255.255.255.0 and then connecting a device to either FastEthernet0/0 or FastEthernet0/1 will cause the DHCP pool to get an address such as 192.168.0.15 (Note I know how to set up a DHCP pool on a single Interface and have that interface give an IP address just fine)

An already working example of what I'm trying to achieve can be seen in most consumer routers, where there are 4 Ethernet ports which all work on the same network, and have the router at the address 192.168.0.1 assigning IP addresses such as 192.168.0.2 to port one, 192.168.0.3 to port two etc.

  • "what I'm trying to achieve can be seen in most consumer routers, where there are 4 Ethernet ports which all work on the same network" Those interfaces are not router interfaces. Routers route between networks, not within a network. What a consumer appliance has is a router (external WAN and internal LAN interfaces), a switch module (external LAN interfaces connected to the router internal LAN interface), and usually a WAP (connected internally to the switch module), along with services like DHCP, DNS, NAT, etc. There is a big difference between switching and routing. – Ron Maupin Dec 16 '17 at 17:28
1

You'll find that the ethernet sockets you're speaking of are actually a switch, on those smaller routers.

Cisco does the same thing with SOHO-type equipment, eg 867VAE, for the same reason.

[EDIT rewrote from here down]

With a 2811 you can add a switch module in just the same way, such as HWIC-4ESW. Switch ethernet ports are also called Layer 2 ports, and they are associated to a VLAN (by default VLAN 1) and can be set to be trunk ports, access ports and so on. These are expected to be faster for switch-like behaviour.

You can also add more "layer 3" interfaces, such as with HWIC-2FE. These have IP addresses, access lists and so on. These are expected to be faster for routing behaviour.

Somewhat confusingly, both types of interface are written the same way,but if you, for example, put an IP address on an L2 interface you get an error:

gw(config)#int fastEthernet 0
gw(config-if)#ip address 1.2.3.4 255.255.255.0

% IP addresses may not be configured on L2 links.

If you have a need for say, four interfaces with 192.168.0.1/24 through 192.168.3.1/24 on them, with routing and access control lists, NAT, etc, then there are a couple of common approaches.

Use lots of L3 interfaces in the obvious way

interface fastethernet 0/1
 ip address 192.168.0.1 255.255.255.0
interface fastethernet 1/1
 ip address 192.168.1.1 255.255.255.0
 ...

Use switch ports, with lots of VLANs [EDIT: corrected this to a config which is correct, from an 867VAE with 15.2]

interface FastEthernet0
 switchport access vlan 100
 no ip address
interface FastEthernet1
 switchport access vlan 101
 no ip address
...
interface Vlan100
 ip address 192.168.0.1 255.255.255.0
interface Vlan101
 ip address 192.168.1.1 255.255.255.0
...

Quite how you make VLANs varies on different routers. On a 2811 with the built-in interfaces (tested on 15.1) you can use an external switch with VLANS, and use "subinterfaces" which look like this

interface FastEthernet0/0
 no ip address
!
interface FastEthernet0/0.100
 encapsulation dot1Q 100
 ip address 192.168.0.1 255.255.255.0
!
interface FastEthernet0/0.101
 encapsulation dot1Q 101
 ip address 192.168.1.1 255.255.255.0
...

Choosing between these approaches depends on the hardware you've got. There are sometimes performance complexities or subtle restrictions eg max ether HWICs for a chassis. My understanding is that some Cisco L3-capable interfaces can be put into L2 mode, and they enter this by the switchport command; but some require "subinterfaces", see below.

A structure which is extremely common is sometimes called "router on a stick". A router is configured with one L3 towards internet, and one set as a trunk port towards a switch. The switch has many VLANs; the router has many interface vlan lines.

Note also the so-called "Layer 3 Switch", which is a switch with a router in it that can be enabled in configuration. The difference between a router with a switch in it and a switch with a router in it is mostly one of engineering emphasis; for many purposes it's just a question of which has got the interfaces you want, and perhaps the routing protocols and higher level functions.

| improve this answer | |
  • I was looking into getting a few of those exact HWICs at some point, but now your answer raises a question for me... If this HWIC allows me to do what I am trying to do, then all of the ports are a switch (which you have confirmed by telling me its a switch module), however does this mean I cannot work with each Ethernet port on the module individually such as FastEthernet1/0, FastEthernet1/1 etc? – DevelopedLogic Dec 16 '17 at 15:49
  • So, understanding what I can from what you said, the answer is no, I cannot access each Ethernet port separately on the HWIC-4ESW, and it will appear in IOS as one Ethernet interface, meaning the HWIC-4ESW is a Layer 2 card and to achieve the multiple separate ports I'd need a different HWIC. Correct? – DevelopedLogic Dec 16 '17 at 16:33
  • This is making much more sense now. My final question: I take it the ability for me to make a VLAN on my router isn't working simply because I have no switch HWICS installed? Thanks for your detailed answer. From what I understand now, with a layer 3 HWIC I can add an IP to each port separately, and with a layer 2 HWIC I can do the same, however I must assign each port to its own VLAN and then assign each VLAN its own IP, essentially making the VLAN the 'level 3 interface' which allows me to address each port on the layer 2 HWIC as though it was layer 3. – DevelopedLogic Dec 16 '17 at 17:25
  • I edited answer, see "subinterfaces". – jonathanjo Dec 16 '17 at 18:14
0

It sounds like you are wanting to configure IRB. See Cisco's Understanding and Configuring VLAN Routing and Bridging on a Router Using the IRB Feature.

Expert advice: simply purchase a switch if you need more Ethernet ports.

enter image description here

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.