Multiple subinterfaces per port on a 3745

Hello Experts,

I am trying to replace a linux router with a cisco 3745 router (IOS

12.4) in a testbed. In my current linux configuration, I am able to create multiple subinterfaces on a single port. e.g. ifconfig eth1.0 10.0.10.1 netmask 255.255.255.0 ifconfig eth1.1 10.0.20.1 netmask 255.255.255.0 | ifconfig eth1.9 10.0.90.1 netmask 255.255.255.0

So I can connect 10 machines, each on a different subnet, to the linux router, using only a simple switch.

I would like to replace the linux router with a cisco router, but have not figured out how to create the subinterfaces on the cisco.

I thought I could do it by using a vlan switch and 802.1q on the port facing the router. The vlan1 tag 101 is applied to all the traffic I am interested in by the switch. On the switch, multiple ports, on multiple subnets, are members of that vlan.

However,starting with this:

interface FastEthernet0/1 no ip address duplex auto speed auto vlan-id dot1q 101 exit-vlan-config ! ! interface FastEthernet0/1.1 ! interface FastEthernet0/1.2

if I do this: RouterC#conf t Enter configuration commands, one per line. End with CNTL/Z. RouterC(config)#interface fa0/1.1 RouterC(config-subif)#ip address 172.16.10.254 255.255.255.0

I get this: % Configuring IP routing on a LAN subinterface is only allowed if that subinterface is already configured as part of an IEEE 802.10, IEEE

802.1Q, or ISL vLAN.

How can I make it "part of an IEEE 802.10, IEEE 802.1Q, or ISL vLAN"?

I also tried this: However,starting with this:

interface FastEthernet0/1 no ip address duplex auto speed auto ! ! interface FastEthernet0/1.1 ! interface FastEthernet0/1.2

RouterC(config-subif)#encaps dot1q 101 native RouterC(config-subif)#ip addr 172.16.10.254 255.255.255.0 RouterC(config-subif)#inter fa0/1.2 RouterC(config-subif)#encaps dot1q 101

%Configuration of multiple subinterfaces of the same main interface with the same VID (101) is not permitted. This VID is already configured on FastEthernet0/1.1

Do I have to use a separate vlan for every subnet? If I do that it seems I would have to apply the tag at every host on the switch. All I want to do is get multiple different networks into one cisco interface, to replace the linux functionality.

Many thanks in advance for any help on this ,

Jim

Reply to
Jim
Loading thread data ...

Jim, If your Linux machine was participating in 802.1q, then, to emulate your Linux machine, you'll want to use dot1q tags, multiple vlans, and sub-interfaces on the router. In order to make it a part of ieee 801.2q, you'll need to change the encapsulation of the sub-interface ONLY. You'll need to take the encapsulation change off of the main interface.

Try this order of commands: config term default interface fa0/1 interface fa0/1.1 encapsulation dot1q 1 ip address 172.16.10.254 255.255.255.0

formatting link
If you decided to use this method, yes, it will mean you will have a different VLAN for every subnet - which is the best practice.

However, my guess is that your Linux machine was NOT participating in dot1q. In that case, and if you want to emulate it most closely, you can use what Cisco calls "secondary" addresses attached to the main interface. This method allows you to use only one VLAN and overlap the layer 3 addresses on top.

To use secondary addresses, remove the dot1q off of the interface and try this: config term interface fa0/1 ip address 10.0.10.1 255.255.255.0 ip address 10.0.20 1 255.255.255.0 secondary ip address 10.0.30.1 255.255.255.0 secondary ip address 10.0.40.1 255.255.255.0 secondary | ip address 10.0.90.1 255.255.255.0 secondary

Good luck JC

Reply to
J.Cottingim

YES! Your second solution works perfectly for me. Correct also, I was not using 802.1q on the linux. Many thanks for a fast and very helpful answer.

Reply to
Jim

Cabling-Design.com Forums website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.