ip default gateway

Unanswered Question
Nov 3rd, 2007
User Badges:

We have two switch s1 and s2, and one router r1.

s1 connect to r1 and s2 connected to s1.

two pc on two different vlan connected to s2.

We know that for ping between the two pc , we have to do the trunking.

It is necessary to give the ip default gateway on the s2. But the router has an ip address on the sub-interface, so the default ip should in which subnet.

The ip on subinterface and of different netmask.

How we decide what the ip address to give on the s2.

  • 1
  • 2
  • 3
  • 4
  • 5
Overall Rating: 0 (0 ratings)
soon_writeme@ho... Sun, 11/04/2007 - 18:46
User Badges:


Please see my post


As far as I have simulated such problem, what you need..

1. First of all create VLAN, rename it if needed. Assign the ports to VLANs.

2. Connect these two switches together via trunk line so that they can exchange vlan information.

3. Connect router to one of switch, assign sub-interfaces on this router. One sub-interface of each VLANs with different subnets (mask accordingly).

4. When you connect any PC to particular VLAN(port beloging to certain VLAN) assign the gateway of that PC same as that same VLAN router sub-interface IP. IP of the PC will be any IP that belong to that subnet.

Thats all you need, as far as I know.

For example:

Router sub-interface and VLANs

VLANs subinterface IP

VLAN 1 fa0/0.1

VLAN 2 fa0/0.2

VLAN 3 fa0/0.3

Now any PC connecting to VLAN 1 (on any switch) its IP will and Gateway will be

Similary, any PC connecting to VLAN 2 its IP will be and Gateway will ne

Try if any problem, please post!

kumarabhi85 Mon, 11/05/2007 - 22:07
User Badges:

hi i m preparing 4 ccna new exam can u plz tell me best study material required to clear the exam i have problem with simulator questions any guidance 4 that plz help me


This Discussion