VLAN and Default Gateway
Christopher Dobkowski
Member Posts: 98 ■■□□□□□□□□
in CCNA & CCENT
Hey there guys!
I have a question.. Let's say I set up a switch with two VLANs... A VLAN 10 and VLAN 20.. I connect a host to VLAN 10, what default gateway should I enter on the host (computer) the routers ip or the VLAN 10 ip i set up using the command:
...# interface vlan 10
...# ip address xxx.xxx.xxx.xxx yyy.yyy.yyy.yyy
Is it if I use the Vlan 10 ip as default gateway I will only have access to the VLAN 10 and not outside it?
What will happen if I assign VLANs 10 ip address as default gateway?
I have a question.. Let's say I set up a switch with two VLANs... A VLAN 10 and VLAN 20.. I connect a host to VLAN 10, what default gateway should I enter on the host (computer) the routers ip or the VLAN 10 ip i set up using the command:
...# interface vlan 10
...# ip address xxx.xxx.xxx.xxx yyy.yyy.yyy.yyy
Is it if I use the Vlan 10 ip as default gateway I will only have access to the VLAN 10 and not outside it?
What will happen if I assign VLANs 10 ip address as default gateway?
Comments
-
NotHackingYou Member Posts: 1,460 ■■■■■■■■□□VLANs operate at layer 2. The default gateway will come from your IP address scheme.When you go the extra mile, there's no traffic.
-
Christopher Dobkowski Member Posts: 98 ■■□□□□□□□□Mhmmm, thank you!
I just realized that the interface vlan ip assigning is used for remote access ^^ -
Zartanasaurus Member Posts: 2,008 ■■■■■■■■■□It depends. You can have an SVI be a default gateway if the switch is capable of routing.Currently reading:
IPSec VPN Design 44%
Mastering VMWare vSphere 5 42.8% -
Christopher Dobkowski Member Posts: 98 ■■□□□□□□□□...# no switchport
and u can use it as default gateway r8?
I mean, the port gets routing properties.. correct? -
DANMOH009 Member Posts: 241If your wanting to communicate between both Vlans, a router on a stick is probably what you'll need to look into, that's what is covered at CCNA level.
-
thsouthern Member Posts: 9 ■□□□□□□□□□sample configure...
!
interface range GigabitEthernet1/0/2-24
auto qos voip cisco-phone
!
!
interface range GigabitEthernet1/0/2-24
switchport access vlan <<Data_VLAN_Number>>
switchport mode access
switchport nonegotiate
switchport voice vlan <<Voice_VLAN_Number>>
no logging event link-status
load-interval 30
no snmp trap link-status
!
! Shutdown unused access ports
interface range GigabitEthernet1/0/25-28
shutdown
! -
Christopher Dobkowski Member Posts: 98 ■■□□□□□□□□Mhmm, thanx DANMOH009
Woaaah, thsouthern, that confused me -
mohamedshajid Member Posts: 81 ■■□□□□□□□□Configuration is doesn't seems to get a practicals to you indeed unless if you find what is the gateway and what is vlan probably, Gateway is allowed to communicate outside and Vlan is assign for something called in switch to separate the stations in your workspace or any other system. If you need to access a vlan to another vlan you should use a router for the gateway and you should create a sub-interface in Router to complete the process of vlan with router or gateway.[2013] CCNA Cert Exam @IBM Premier Campus in Sri Lanka
+ Reading Todd Lammle CCNA 7th Edition, CCENT Cert Dummies
I'm totally afraid of heard strange word of cisco
+ Next Career - Red Hat Linux Networking And CCNA: Security (2013 Before June) -
oli356 Member Posts: 364mohamedshajid wrote: »If you need to access a vlan to another vlan you should use a router for the gateway and you should create a sub-interface in Router to complete the process of vlan with router or gateway.
The way its normally does is by using L3 switches, the switch will have an IP address assigned to the VLAN (SVI), the hosts can have this IP as the DG and the switch will be able to route the packets between VLANs without a router with subinterfaces.Lab:
Combination of GNS3 and Cisco equipment if required.