cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
1715
Views
0
Helpful
7
Replies

2-Subnets,1-gateway and 1-network

ade1dapo2
Level 1
Level 1

Hi seniors,i need your help,i am currently working to add a subnet to the existing network.I will like the best possible way to handle this on a cisco router.

Network 1(LAN):172.19.8.0/22

Gateway:172.19.8.1

 

Network 2(LAN):172.19.16.0/22

 

How can i make computers on subnet 172.19.16.0/22 to use the gateway (172.19.8.1) of LAN 1?

Host on all subnets are to access internet.

 

Thanks as i await your feedback.

7 Replies 7

Hello

I assume the device that is performing the routing is a L3 switch, if so you need to create an additional L3 switch virtual interface (SVI) to accommodate your new subnet.

 

The users on this new vlan will have a default-gateway of the new vlan L3 address on the switch and the switch will then be able route between you old and new vlans if users on either subnet need to communicate with each other

 

conf t
int vlan 2
Description LAN2
ip address 172.19.16.1 255.255.252.0
exit


vlan 2
exit

 


Please rate and mark as an accepted solution if you have found any of the information provided useful.
This then could assist others on these forums to find a valuable answer and broadens the community’s global network.

Kind Regards
Paul

Thanks Paul for the quick response.Users on both subnet must comminicate and i am using a 2900 series router.

 

What i will like to achieve is for 172.19.16.0 network to use the default gateway of 172.19.8.0 network.

Users on both subnet should be able to access internet.

I will appreciate possible configurations for the above for better understanding.

 

Thanks as i await your feedback

We do not know enough about your environment and what you plan to do to be able to give good advice. It is helpful to know that this will be done on 2900 router. We do not know whether this new subnet will be connected to the same router interface as the original subnet or will be connected to another interface on the router. Can you clarify this?

 

If both subnets are to connect to the same interface then you could implement the new subnet using a secondary address on the router interface. And in this case it might be possible that all connected devices could use the same gateway. If the new subnet will be implemented on a separate interface then having the devices in the new subnet use the original gateway address would be a challenge. It is not a problem for the router, which would happily forward traffic from the new subnet  using the original gateway address (assuming that proxy arp is enabled). But it would possibly be an issue for the connected devices in that subnet. For many OS there is a requirement that the gateway be an address in the subnet to which they belong. If a connected device has its IP address in the new subnet and its gateway in the old subnet then its IP network stack might treat that as an error and not send its traffic.

 

HTH

 

Rick

HTH

Rick

Hello

So it a router, then can you post the running config of that router and if applicable answer the queries that @Richard Burts  asked, Maybe attached a simple topology diagram also


Please rate and mark as an accepted solution if you have found any of the information provided useful.
This then could assist others on these forums to find a valuable answer and broadens the community’s global network.

Kind Regards
Paul

Thanks for the prompt response.

 

I am yet to deploy the configuration,just looking for the possible best way to resolve this.

I currently run 172.19.8.0/22-LAN network and my DHCP server is running out of IP's for this network as 172.19.8.0,172.19.9.0,172.19.10.0 and 172.19.11.0 are almost exhausted,hence the need to add a new subnet-172.19.

If the new subnet can be a sub-interface on the existing G0/1 interface as stated below,that will be nice.I also understand the difficulty to use a different gateway outside a subnet which is exactly what i am trying to achieve.

----Ability of the new subnet to use the existing gateway

----Any other best effective ways to achieve the above issue as my main objective is for my DHCP server to have more IP's to dish out.please find attached part of the running config.

 

Thanks as i await your response.

Hello ade1dapo2,

 

>> ----Ability of the new subnet to use the existing gateway

 

This is not possible in IPv4 as all hosts in IPv4 can only use a default gateway that is in the same IP subnet and can be resolved with ARP (in the case of a LAN interface).

The use of a subinterface with appropriate Vlan encapsulation is to be preferred over using secondary IP address : the subinterface will be the default gateway for the new subnet and you will keep the two broadcast domains separated as the existing subnet is already a /22 with many hosts connected to it.

 

int gi0/1.100

enc dot1q 100

ip address <IP-in-new-subnet> 255.255.255.0

 

If the device is a router you can keep existing layer3 config on the physical interface that will process untagged frames and add the subif. This is very handy for your case.

 

As far as I know in IPv4 two hosts belonging to different IP subnets cannot talk directly and they need to go via their respective default gateway this is why the secondary IP address option does not provide any advantage.

The only special case is when Proxy ARP can help an host with a less specific subnet mask  to talk to devices it thinks they are directly connected but they  are actually behind a router (or more then one).

 

In IPv6 communication between hosts in different on-link prefixes without involving a router is possible for the more intelligent neighbor discover process and because the protocol was built in this way from the beginning.

There are no secondary addresses in IPv6. An interface can have multiple IPv6 unicast addresses belonging to different prefixes in addition to link local addresses.

 

Hope to help

Giuseppe

 

We now know some more about the situation than we did before. In particular it is obvious that the router is connected to a switch and is already doing some sub interface processing for multiple vlans. So it should be possible to configure another vlan sub interface to implement the new subnet.

 

There is another possibility to consider. If the objective is simply to increase the size of the address space for that interface it should be possible to change the subnet mask of the interface. Instead of having 172.19.8.0/22 it would be possible to have 172.19.0.0/20 (with interface address 172.19.8.1). This would allow the existing hosts to stay as they are and to provide the desired additional address space. I recognize the comment that has been made about the size of the subnet and agree that I would have some concern about having that many devices in a single broadcast domain. But I think it is an alternative that should be considered.

 

There is another aspect of this discussion which is the desire to have the new subnet continue to use the existing gateway. The original poster has been quite insistent that this is one of the objectives. I am not clear why. But this is going to be difficult - if not impossible. It is not so much an issue for the router, which probably could do it. But the real challenge is for the hosts that will connect in the new subnet. We do not know what they are and what OS they use. But many OS will have major difficulty if the gateway configured on the device is not in the same subnet as the device address.

 

HTH

 

Rick

HTH

Rick
Review Cisco Networking products for a $25 gift card