cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
333
Views
0
Helpful
3
Replies

default gateway

rajbhatt
Level 3
Level 3

Hi,

router---s1 switch---core switch

|

server

|

s2switch------- s3 switch

I have 2 questions:

In the s1 switch i will configure vlan and assign ports .I will configure an ip address as well. Do I need a gateway ?

S2 will be a dead switch I just need to configure 100 mbps to s3 .

What will be the config in this case

Raj

3 Replies 3

Amit Singh
Cisco Employee
Cisco Employee

Hello Raj,

1. You need a default-gateway if you want your hosts to communicate outside their vlan.In your example, if you want your hosts to communicate to some other vlan hosts on S1 or to other hosts on S3, you need default-gateway on your hosts.

2. Howz you connectivity to router from S2.Is that an access link or trunk link.If you have multiple vlans across all the switches, you need to configure the links are trunk links.If you dont have multiple vlans config the links as the access links.

HTH,

-amit singh

HI Amit ,

Thanks for ur prompt reply .

But here is my changed config :

et me modify the diagram :

router---s1---s3(core)

|

server

|

s2---(100Mbps link)-----s4

For s1

interface Vlan1

description MANAGEMENT

ip address 10.134.21.173

interface FastEthernet0/1

description Router

switchport access vlan 36

switchport mode access

spanning-tree portfast

interface FastEthernet0/2

description Router

switchport access vlan 37

switchport mode access

spanning-tree portfast

interface FastEthernet0/3

description Router

switchport access vlan 37

switchport mode access

spanning-tree portfast

dO i need switch port mode access commadn at all ?

Will this switch config work? I dont need default gateway in thiscase

and no hosts from different vlans will communicate

Also what type ofport will i require for router and s1

s4 and s2 will have no configs other than 100 mbps link

betweem them .If I conenct with a cross over cable and make

it trunk or access what will be my config.L2 swicth with no ip or vlan

I only need to set the port between the switches and the servers at 100 mbps .

Wht is the config for that

Raj,

You are still missing an explanation for what you want to achieve and what is the proper network topolgy that you want to make. Without a mpropoer network diagram and a correct explanation it will hard to let you know the exact configuration you would require.What type of switch is S3. Do you want inter-vlan routing to be done on router etc...

Let me try to be inline as per your descritpion. To use " switchport mode access " command, it depends on the switch that you are using.You dont need this command on 2950 switches as the ports are default to mode access.

Switch config is OK.If you want your S1 or S3 switch hosts to communicate to some other hosts outside their vlan, you need a default-gateway for sure.If you want router to do the inter-vlan routing then your switch port will be configured as trunk link otherwisie it will be an access link and the router will connect to the particular Vlan port.

Between S2 and S4 config will be like this:

Lets assume that both the switches use their port 1 for the connectivity:

For S2

switch(config)# int fa 01

switch(config-if)#switchport mode trunk

switch(config-if)#switchport trunk encapsulation dot1q <-- this command will be used depending on the switch type you have, you dont need this for 2950's.

For S4

switch(config)# int fa 01

switch(config-if)#switchport mode trunk

switch(config-if)#switchport trunk encapsulation dot1q

To connect server to a particular vlan

switch(config)# int fa 0/2

switch(config-if)#switchport mode access

switch(config-if)#switchport access vlan

HTH,

-amit singh

Getting Started

Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community: