ip default gateway

Unanswered Question
Nov 3rd, 2007

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.

I have this problem too.
0 votes
  • 1
  • 2
  • 3
  • 4
  • 5
Overall Rating: 0 (0 ratings)
Loading.

Arif,

Please see my post

http://blog.erealmedia.com/?p=28

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 192.168.1.1

VLAN 2 fa0/0.2 192.168.2.1

VLAN 3 fa0/0.3 192.168.3.1

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

Similary, any PC connecting to VLAN 2 its IP will be 192.168.2.2-254 and Gateway will ne 192.168.2.1

Try if any problem, please post!

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

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

Actions

This Discussion