И IP-адрес и шлюз по умолчанию, необходимый на переключателе для включения коммуникации между различными VLAN?

При построении сайта с нуля можно использовать CMS, такой как Drupal, который имеет модуль форума, который может быть интегрирован в сайт.

0
задан 29 May 2012 в 12:26
2 ответа

You can easily find nowadays Layer 3 switches, i.e., switches with routing capabilities. It works by creating virtual interfaces (vlan interfaces) with IP addresses. Just doing that you create entries on the switch routing table (yes, as I've said, it behaves as a router!) and the vlans will communicate with each other.

You can add static routes (as a default route pointing to your firewall, for example) or even enable a dynamic routing protocol (ospf, bgp...), depending on the hardware and firmware available resources. And your hosts and servers can use this switch as their default route.

Here is an example on a Cisco switch:

!
interface Vlan5
 ip address 10.50.0.1 255.255.255.0
!
interface Vlan6
 ip address 10.60.0.1 255.255.255.0
!
interface GigabitEthernet0/1
 description Desktop station
 switchport
 switchport access vlan 5
 switchport mode access
!
interface GigabitEthernet0/2
 description Server
 switchport
 switchport access vlan 6
 switchport mode access
!
ip route 0.0.0.0 0.0.0.0 10.60.0.254
!
switch1#sh ip route
Codes: C - connected, S - static, R - RIP, M - mobile, B - BGP
       D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area 
       N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
       E1 - OSPF external type 1, E2 - OSPF external type 2, E - EGP
       i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2
       ia - IS-IS inter area, * - candidate default, U - per-user static route
       o - ODR, P - periodic downloaded static route

Gateway of last resort is 10.60.0.254 to network 0.0.0.0

     10.0.0.0/8 is variably subnetted, 2 subnets, 1 mask
C       10.50.0.0/24 is directly connected, Vlan5
C       10.60.0.0/24 is directly connected, Vlan6

In this example, the device connected on interface G0/1 will be able to communicate with the other one connected on the G0/2, even though they are on different vlans (and that default route is not required).

0
ответ дан 4 December 2019 в 14:28

The switch will switch, no matter what. If that allows the VLANs to communicate with each other because the proper routing is in place, then it makes no difference whether the switch has an IP address or default gateway. All it's going to do is switch, and it can do that without a default gateway or IP address.

Something has to route between the VLANs, and the switch won't do that. But the switch will happily switch packets to and from the device that's doing the inter-VLAN routing.

Say you want to get traffic from VLAN 7 to VLAN 8. A switch will happily carry the VLAN 7 traffic to a router, which will route it onto VLAN 8. Then the switch will happily carry the VLAN 8 traffic from the router. So the switch will do its part of switching inside each VLAN to allow the router to do its job of interconnecting the VLANs.

2
ответ дан 4 December 2019 в 14:28

Теги

Похожие вопросы