Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game. |
Notices |
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
Are you new to LinuxQuestions.org? Visit the following links:
Site Howto |
Site FAQ |
Sitemap |
Register Now
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
|
 |
06-01-2013, 03:26 PM
|
#1
|
Member
Registered: Apr 2010
Location: India /Hyderabad
Distribution: RedHat, CentOS
Posts: 273
Rep:
|
networking between multiple networks, network from scratch
hi all,
i have to setup network for new branch office, every thing is done,
our engineers works with around four networks.
so i setup a CentOS box with 4 nics and turned it into a router.
each networks has 20-30 systems, i have setup four 48 port switches and i connected four switches to CentOS box
working perfectly in other office,
But since it's a CentOS box, there lot of chance for it's failure like,
SMPS
HDD
MBOARD
that to cooling fecility, if it gets hot it might crash.
Can any one help me out how to do it with a pc with multiple lan cards, like any router... but how can i have more ports in a cisco router.
any best idea.
thanks in advance.
|
|
|
06-02-2013, 12:00 PM
|
#2
|
LQ Guru
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 27,659
|
Quote:
Originally Posted by Gil@LQ
hi all,
i have to setup network for new branch office, every thing is done, our engineers works with around four networks. so i setup a CentOS box with 4 nics and turned it into a router. each networks has 20-30 systems, i have setup four 48 port switches and i connected four switches to CentOS box working perfectly in other office,
But since it's a CentOS box, there lot of chance for it's failure like,
SMPS
HDD
MBOARD
that to cooling fecility, if it gets hot it might crash.
|
That makes no sense. ANY computer will fail if the hard drive, motherboard, or other piece of hardware goes bad. Saying it would only fail because it's running CentOS is nonsense. Same with overtemperature.
Quote:
Can any one help me out how to do it with a pc with multiple lan cards, like any router... but how can i have more ports in a cisco router.
|
Simple: you buy another PC, configure it as you have the first one, and set them up in HA mode, or you buy a bigger Cisco router.
|
|
|
06-03-2013, 01:19 AM
|
#3
|
Member
Registered: Apr 2010
Location: India /Hyderabad
Distribution: RedHat, CentOS
Posts: 273
Original Poster
Rep:
|
Hi TBone,
How r u doing after a long time.
Quote:
Saying it would only fail because it's running CentOS is nonsense. Same with overtemperature.
|
Sorry for that you mistook me, i don't mean it will fail because it running CentOS. My old CentOS box working perfectly all right with out any issues for last one and half an year.
My plan is use a device like router or L3 switch in new office. But i'm new to cisco. so i doubt how cisco router will have 4 lan ports or more to scale in future , i know if it's L3 switch it will have more ports,
My thought is using rotuer/L3 switch fits perfectly in network environment rather than a pc with multiple lan cards.
Quote:
But since it's a CentOS box, there lot of chance for it's failure like,
|
probably you mistook me for above line, since it's CentOS box in the sence , a normal computer turned into a router. i'm not degrading CentOS.
Quote:
you buy another PC, configure it as you have the first one, and set them up in HA mode,
|
can you please give me little info configuring it in HA mode.
Please don't think i'm confusing and thinking about all the method, i'll be clear this time i don't want to go with a PC router for joing multiple network, i want some perfect device to do it for me. and also i want to know how to do HA mode.
thank you very much for your time TBone.
|
|
|
06-03-2013, 08:33 AM
|
#4
|
Member
Registered: Sep 2007
Location: Canada
Distribution: RHEL, Debian, SUSE
Posts: 34
Rep:
|
Buy a reliable hardware to be used as a router, SONICWALL / CISCO support Active / Passive configuration and the hardware is unlikely to fail!
Your CentOS box is more likely to have issues / harder to administrate.
|
|
|
06-03-2013, 09:58 AM
|
#5
|
LQ Guru
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 27,659
|
Quote:
Originally Posted by Gil@LQ
Hi TBone,
How r u doing after a long time.
|
Again, you need to SPELL OUT YOUR WORDS and quit using text speak.
Quote:
Sorry for that you mistook me, i don't mean it will fail because it running CentOS. My old CentOS box working perfectly all right with out any issues for last one and half an year.
|
I didn't misunderstand...you said "But since it's a CentOS box, there lot of chance for it's failure like, HDD MBOARD". Again, if a system is running Windows and the motherboard dies, the system is down. OS makes ZERO difference.
Quote:
My plan is use a device like router or L3 switch in new office. But i'm new to cisco. so i doubt how cisco router will have 4 lan ports or more to scale in future, i know if it's L3 switch it will have more ports
|
There are Cisco switches with HUNDREDS of ports. Rather than cobble something together, you need to use the right piece of equipment for the job. Buy a decent switch/router, and move forward. Cisco 48 port switches are about $1000, and you can add more later. And the network layer things run on means nothing when it comes to how many ports it has.
Quote:
My thought is using rotuer/L3 switch fits perfectly in network environment rather than a pc with multiple lan cards. probably you mistook me for above line, since it's CentOS box in the sence , a normal computer turned into a router. i'm not degrading CentOS.
|
Doesn't matter to me at all what you think about CentOS, if anything at all.
Quote:
can you please give me little info configuring it in HA mode.
|
Google can...there are THOUSANDS of easily found how-to guides.
Quote:
Please don't think i'm confusing and thinking about all the method, i'll be clear this time i don't want to go with a PC router for joing multiple network, i want some perfect device to do it for me. and also i want to know how to do HA mode.
|
The 'perfect device' is called a switch. Buy one.
|
|
|
06-05-2013, 02:10 AM
|
#6
|
Member
Registered: Apr 2010
Location: India /Hyderabad
Distribution: RedHat, CentOS
Posts: 273
Original Poster
Rep:
|
hi TB0ne,
last night i came across subnetting, which means with same broadcast domain. i used online subnet calculator and did as below
networks between 192.168.0.0 - 192.168.63.0 work with subnet of 255.255.192.0 and also ping with each other.
Quote:
192.168.20.0 255.255.192.0
192.168.30.0 255.255.192.0
192.168.31.0 255.255.192.0
192.168.32.0 255.255.192.0
i can keep all the lan cables from above four networks in to a singlw switch and they are communicating. is it k
is 192.168.20.0 with subnet 255.255.255.0 is different from 192.168.20.0 with subnet of 255.255.192.0 ?? any performance of any issue by doing like this ?
|
if its k, i don't have to buy any swtich.
thank you very much.
|
|
|
06-05-2013, 08:39 AM
|
#7
|
LQ Guru
Registered: Jul 2003
Location: Birmingham, Alabama
Distribution: SuSE, RedHat, Slack,CentOS
Posts: 27,659
|
Quote:
Originally Posted by Gil@LQ
hi TB0ne,
last night i came across subnetting, which means with same broadcast domain. i used online subnet calculator and did as below networks between 192.168.0.0 - 192.168.63.0 work with subnet of 255.255.192.0 and also ping with each other.
if its k, i don't have to buy any swtich.
|
No idea what you mean by "if its k", and you can buy/not buy whatever you'd like. That's all up to you. If you can make things work as you'd like, then your problem is solved. And it would have helped if you had mentioned the different networks and what your real goals were when you first posted.
|
|
|
06-05-2013, 09:37 AM
|
#8
|
Senior Member
Registered: Jan 2012
Distribution: Slackware
Posts: 3,349
Rep: 
|
Quote:
Originally Posted by Gil@LQ
Can any one help me out how to do it with a pc with multiple lan cards, like any router... but how can i have more ports in a cisco router.
|
VLANs and VLAN trunks may be what you're looking for. This can be implemented with both Linux and Cisco equipment.
Today, you have a (CentOS-based) router with 4 NICs, each connected to a switch representing a separate LAN segment. A VLAN-based solution would mean assigning different VLAN numbers to each segment and use a single NIC on the router as a VLAN trunk (also known as a "tag port") to carry traffic from and to each segment.
Using VLANs also means you get do decide which VLAN each switch port belongs to. You can use the same physical switch to serve multiple VLANs, and you can expand the infrastructure by daisy-chaining another switch off a VLAN trunk port.
Here's how you configure eth0 as a VLAN trunk on Linux:
Code:
vconfig add eth0 10
ifconfig eth0.10 192.168.10.1 netmask 255.255.255.0
These commands will create the VLAN interface "eth0.10" and assign an IP address to it. Traffic originating from this interface will be encapsulated inside an 802.1q VLAN header and sent out the parent interface (eth0). The device at the other end of the link must be capable of handling 802.1q encapsulated frames.
The number "10" in the example is the VLAN number. This is basically a randomly chosen number in the 2-4094 range, excluding 1002-1005 for historical reasons. On Cisco equipment it is recommended to use VLAN numbers below 1002.
The commands above will work regardless of distribution, but the changes will be lost when the system is rebooted. The various Linux distributions handle network configuration slightly differently, so you will need to consult the documentation to figure out how VLANs should be defined in CentOS, using either a GUI or adding entries to a configuration file.
On a Cisco switch, you simply create the same VLAN and configure a switch port as a VLAN trunk (commands in bold):
Code:
switch> enable
switch# configure terminal
switch(config)# vlan 10
switch(config-vlan)# interface GigabitEthernet0/0
switch(config-if)# switchport mode trunk
switch(config-if)# end
switch# write memory
The above commands put the GigabitEthernet0/0 interface in trunk mode after entering first privileged mode then configuration mode, and then exits configuration mode and saves the changes. You can now put other interfaces in VLAN 10 as required:
Code:
switch(config)# interface FastEthernet0/5
switch(config-if)# switchport access vlan 10
Any equipment plugged into port 5 on the switch will now communicate with eth0.10 on the router. Note that all switch ports are in VLAN 1 by default.
If you're not using Cisco switches, just make sure they support 802.1q. I don't think you will find any manageable switch that doesn't. 802.1q is an IEEE standard, so the make of your switches really doesn't matter, and the configuration steps are always the same: Define the VLAN(s), configure the trunk interface(s), then join the relevant switch ports to the correct VLANs.
If you decide to replace the CentOS box with a Cisco router, you create VLAN subinterfaces like this:
Code:
router(config)# interface FastEthernet0.10
router(config-subif)# encapsulation dot1q 10
router(config-subif)# ip address 192.168.10.1 255.255.255.0
However, licensing restrictions may prevent you from creating more than a certain number of VLANs. Make sure you buy the correct IOS license for your router.
Last edited by Ser Olmy; 06-05-2013 at 09:47 AM.
|
|
1 members found this post helpful.
|
All times are GMT -5. The time now is 01:23 PM.
|
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.
|
Latest Threads
LQ News
|
|