Intervlan routing to share printers between vlans - networking

I have 3 separate vlans and subnets (192.168.175.0/24,192.168.176.0/24, 192.168.178.0/24). I need to have the ability to print from a single network printer from any server on these subnets. I have created a 4th vlan for this purpose but I'm not really sure how to configure the intervlan routing on the main switch where these vlans are.
I'm using a Cisco 3560G and trying to use the routing wizard.

Okay, so... Routing between VLAN's is really very simple. First, a VLAN is nothing more than a broadcast domain. When you try and send a packet to a machine, an ARP broadcast goes out to see if any hosts on the local broadcast domain (VLAN) have the IP address. If so, they respond with the MAC address. When an ARP response isn't received, the packet is sent to the router to do something else with it. If the address is not part of the local broadcast domains network (identified via the subnet mask), it's sent to the networks router.
Take the following in to consideration: You have 4 VLAN's... VLAN1, VLAN2, VLAN3 and VLAN4. Each has their own /24 network: 192.168.1.0/24, 192.168.2.0/24, 192.168.3.0/24 and 192.168.4.0/24 . What you should have on your router is something like this:
(interface names may be different, but you'll get the idea)
int fa0/0
no shut
int fa0/0.1
encapsulation dot1q 1
ip address 192.168.1.1 255.255.255.0
int fa0/0.2
encapsulation dot1q 2
ip address 192.168.2.1 255.255.255.0
int fa0/0.3
encapsulation dot1q 3
ip address 192.168.3.1 255.255.255.0
int fa0/0.4
encapsulation dot1q 4
ip address 192.168.4.1 255.255.255.0
The "encapsulation dot1q #" is telling the router, "Encapsulate any L2 frames on this interface with VLAN ID #" . VLAN's are a L2 concept, not L3. So, that in mind, it's important to understand we need to "transport" that L2 connectivity back to the switch and the hosts on the switch.
With the above configuration, interface fa0/0 should be connected to a trunk port on the switch. If you're plugged in to a Cisco switch, "switch port mode trunk" should do the trick. If you're using a non-cisco switch, it will most likely be:
switchport untagged vlan 1 <- default vlan
switchport tagged vlan 2,3,4 <- other VLAN's allowed
That in mind, any hosts should be on ports in their respective VLAN:
Again, if cisco: switch access vlan #
If not, most likely: untagged vlan #
For each port that has a host.
Each host in each VLAN should have their respective gateways as their default gateway... i.e. VLAN 1 should have the IP of fa0/0.1 (192.168.1.1) . VLAN 2 - fa0/0.2 (192.168.2.1) .
This is a very simple methodology. I'd recommend you grab the CCENT or CCNA library, as it can greatly help you understand these concepts.

Related

Configuration virtual Vlan instead of physical port

Currently i am studying for NAT and from what i read, vlans on physical port on switch actually not good for NAT.
I search for a couple of times but only sources that i got, configure the vlan on physical port like
interface gi0/1
switchport mode access
switchport access vlan 10
Instead of doing this, i want to do
interface vlan 10
ip add 10.1.12.254 255.255.254.0
ip nat inside
What is the differences between interface gi0/1 and accessing vlan through that port, and interface vlan 10?
I cannot make encapsulation dot1q through interface vlan 10, or it works only for physical ports?
Let's say that i have two vlans, vlan 10 (WLAN) and vlan 99 (USERS). Vlan 10 has an IP address 10.1.12.0/23 and port is gi1/0/24.
Vlan 99 has an IP address 10.1.14.0/24 and range is gi1/0/1-23.
Do I need to configure them like,
interface range gi1/0/1-23
switchport mode access
switchport access vlan 99
or are there any way for me to configure only interface vlan 99?
I know this is a basic configuration but two of them making me so confused.
Many thanks
One of the differences between interface VLAN and the physical interface is, you can add an IP address to an interface VLAN, but in L2 switch you can't add an IP address to a physical interface.
We can say physical interface is a layer 2 interface and doesn't support layer 3 options like IP and Routing and etc.
Network admins use Interface VLAN as a gateway for each VLAN. For example, if you want to use inter-VLAN routing, you can use interface VLAN as a gateway for all traffic in that VLAN.
when you say
int gig 0/0
switchport mode access
switchport access VLAN 2
The switch itself tags the port to dot1q vlan 2. So you don't need to tell the switch anything. You just need to put the physical port in the vlan.
VLAN tagging is an interface-level virtualization - it enables you to connect multiple L2 segments (broadcast domains) to a single physical interface (or an aggregated group), sharing the bandwidth.
On some devices that virtualization may have an impact on its other functions (like NAT), but generally that's not the case. Whether you use a routed/L3 port or a switched port with a switch virtual interface (SVI), a VLAN-to-IP binding, may be a matter of taste, architecture, policy, device capability or performance. On many devices, both approaches work absolutely fine.

Can't route VLAN with UCOPIA

I'm writing to you because I can't solve a problem with a client.
My client has an infrastructure with the following characteristics:
2 ISP routers
1 fortigate firewall
1 dedicated router that broadcasts a UCOPIA US250 guest portal
65 Zyxel switches (1900 - 24) and one 4600 switch (4x 24 ports for the core network)
250 WIFI LIGOWAZE NFT terminals
80 VLANs
I do not manage the first 3 equipments, it is another provider.
Today, I have to pass the VLAN dedicated to the guests.
The other provider has set up the FORTIGATE to broadcast the DHCP and the associated VLAN on the DMZ port to the OUT port of the UCOPIA.
I have to broadcast VLAN 420 from the IN port to the ZYXEL switch and to the LIGOWAVE terminals.
However, when I am connected to the UCOPIA on the IN port, I manage to get the desired IP and to reach the portal, but when I test on the ZYXEL switch, it is impossible to get the dedicated VLAN.
I put myself on another port of the ZYXEL, I TAG the VLAN in question. I have modified the ID of my VLAN on my computer in DHCP that does not work. I tried to use static IP but still nothing. I can't even ping the gateway.
The ZYXEL port to which the UCOPIA is connected is TAGGED on the dedicated VLAN. I have also tried Untagged and excluding all the other VLANs but it is impossible to get this network.
Do you have any other ideas for me?
Here, you can see my diagram network:
MyNetwork
I resolved my problem.
I configured Switch like that:
Untagged dedicated VLAN
But i forgot to change the PVID VLAN.
I changed it and that work !

How to achieve Layer 3 Broadcast

While Layer-2 Broadcast is very simple and straightforward, have dst mac in ethernet hdr = Broadcast mac, and you are done (Eg. ARP broadcast request msg). My question is how to achieve Layer-3 Broadcast using TCP/IP stack.
What should be the content of ethernet hdr and IP hdr (in terms of src and dst mac and src and dst ip addresses)? Basically I am looking at what should be the content of packet headers to facilitate ip/layer-3 broadcast. I have a topology of L3 routers connected. I want to know how one L3 router could broadcast a frame/pkt so that it reaches every other router. How to do L3-broadcast?
Is dst ip in IP hdr should be 255.255.255.255 in addition to dst mac in erthernet hdr = FF:FF:FF:FF:FF:FF?
you need to send the packet to the subnet broadcast address. for example, you have a network 192.168.1.0 255.255.255.0.
If you are sending a packet to 192.168.1.255 (routed), the router will generate a broadcast with destination FF:FF:FF:FF:FF:FF in the ethernet header.
But, many router are suppressing this. On Cisco Router, you can enable this with the command "ip directed-broadcast" on a interface.
try it out in your LAN.. take the broadcast address of your subnet (the very last address) and make a ping to that address... you will see an answer from many devices (not all devices will respond, depending on their implementation)
WakeOn LAN for exaple take usage of this method.. google it.
its not possible to reach multiple L3 Network because there is nothing like "l3 Broadcast" broadcast is Ethernet! If you want to do it, you need a bridged network (l2circuit) between the 3 Sites. Or, you can use Multicast if you want a 1 to many stream.
edit: maybe i should mention, per definition of ip, there is no broadcast! ip knows unicast and multicast. so you will not find any one router in the world that has something implemented like ip-broadcast. you have to write your application based on multicast!

VLAN Subnetting Ruckus and Fortigate and Cisco

This is an easy solution, I just don't have it, so please help!
I have 6 Ruckus R500 WAP, connected into 2 Cisco SG300's, which are then connected to FortiGate 200D.
On the WAP, I have 5 SSID, one of which is set to VLAN 2.
The ports which the WAP connect to on the SG300's have VLAN 2 added to them, trunk mode.
In the FortiGate200D:
All ports are in LAN HW Switch.
IP: 10.3.7.210/255.255.252.0
DHCP 10.3.4.1-10.3.5.254
I have a VLAN sub created on the LAN, with an Id of 2.
IP: 10.3.9.1/255.255.255.0
DHCP 10.3.9.2-254
There are "auto" routes created for 10.3.9.0/24 --> 0.0.0.0
When I connect to the VLAN 2 SSID, I am unable to pull an IP. If I set static IP, I am unable to ping. Where am I messed up? Is it because my LAN HW Switch subnet does not contain 10.3.9.xxx ? What would the best way to overcome this be, perhaps change LAN HW Switch to 10.3.0.0/21?
Basically the end goal is 10.3.4.0 and 10.3.5.0 for normal connections. And then a separate subnet for VLAN2, could be 10.3.8.0 or 10.3.9.0 or whatever, even 192.168.1.0.
This was solved by Zac67. I had to correct tagging, then open up traffic to WAN and DHCP kicked in just fine. Thanks Zac67

Two hosts with different subnets on layer 2 switch - why does this work?

I am just preparing for a test in college about networking.
I'm currently trying around with sub netting and I found out that two devices attached to a layer 2 switch can talk to each other although they have different subnets!
Device A: 192.168.0.1 subnet mask : 255.255.255.0
Device B: 192.168.1.1 subnet mask : 255.255.255.0
The question is why I can ping from device A to B and vice versa?
There's no router, just the two devices and a switch.
From my understanding they should not see each other.
The OS should not even send the ARP request when the unknown IP is in a different subnet.
Could this be a caching issue?
Many Cisco Layer 2 switches are capable to ping the connected systems.
It is possible that your computer might have a route entry that sends a packet which matches no other specific route entry to your router. This is also called as the default gateway. Conventionally the computers in the same subnet are connected directly and most of the times, do not go through the gateway.
To explain it more clearly, If you're on a Linux machine, run route -n.
Destination Gateway Genmask
14.0.1.0 0.0.0.0 255.255.255.0
0.0.0.0 172.16.80.1 0.0.0.0
The first entry has a destination ranging from 14.0.1.0 to 14.0.1.255. The gateway for this match is 0.0.0.0. The table implies that these systems are connected directly. On the other hand, the entry 0.0.0.0 in the destination field will get matched when the packet matches none of the other entries. The gateway for this is the router address (which in my case in 172.16.80.1). All the packets that do not have IPs in the range that I specified above go to the router for further routing. Once the router gets the packet, it takes the further decision based on its routing information that it posses.
In your case the router happens to know that the other subnet is attached to it and hence passed your packet onto that subnet.
Have a closer look at the ARP. The ARP would be addressed to the router in your case of pinging to the other subnet. On the other hand, if pinging within the network, the ARP would be to the destination directly. This is the conventional case. Of course, it all depends on the routing tables in your system. You can always make all packets go through the gateway or no packets to go through the gateway.

Resources