Sponsored Content
Full Discussion: Linux with two NICs
Top Forums UNIX for Dummies Questions & Answers Linux with two NICs Post 302831297 by AndreiM on Thursday 11th of July 2013 05:03:29 AM
Old 07-11-2013
Thank You Corona688, but ip_forward is enabled.
The distribution is CentOS and it also enabled on boot by changing net.ipv4.ip_forward = 1 option in /etc/sysctl.conf

Best Regards

---------- Post updated 07-11-13 at 04:03 AM ---------- Previous update was 07-10-13 at 03:11 PM ----------

I found a solution using iproute2:
1. Step: Adding two new Routing Tables
echo «101 T1» >> /etc/iproute2/rt_tables
echo «102 T2» >> /etc/iproute2/rt_tables

2. Step: Filling new created Routing Tables
ip route add 192.168.1.0/24 dev eth0 src 192.168.1.10 table T1
ip route add default via 192.168.1.1 table T1

ip route add 192.168.2.0/24 dev eth1 src 192.168.2.10 table T2
ip route add default via 192.168.2.1 table T2

3. Step: Adding Rules
ip rule add from 192.168.1.10 table T1
ip rule add from 192.168.2.10 table T2
As I understand this is for traffic coming from eth0 uses T1, while from eth1 uses T2. (I can be wrong)

Thank You All,

Best Regards
 

10 More Discussions You Might Find Interesting

1. UNIX for Dummies Questions & Answers

Mac addresses of NICs (why are they the same)

I am training to be support on our solaris based network and was wondering why solaris seems to assign the same mac address to all NICs placed in the machine regardless of how many NICs are in there, when i do a ifconfig -a all nics have same MAC. Presumably this is a feature and there is... (1 Reply)
Discussion started by: hcclnoodles
1 Replies

2. IP Networking

3 nics, 2 with same network/mask

I run openbsd with 3 NICs, ep1 is dhcp, interface with internet ip addy dc0 is 192.168.0.254/24 sis0 is 192.168.0.253/24 My system somehow lags, and some services do not work properly, i want to run a lot of local network services like samba, named, ftp, http, dhcpd, radiusd. output of... (1 Reply)
Discussion started by: hachik
1 Replies

3. AIX

Merge NICs

Hi friends, I installed oracle 10g (10.2.0.2) RAC on 2 IBM p5 570 servers running AIX 5.3ML04 and HACMP5.2 (used Raw devices, not used GPFS). Each server has 4 x 1Gbps ethernet cards (NICs), en0 and en1 for boot address, en2 and en3 for oracle interconnect. Now i want to merge 2 NICs (en2 and... (1 Reply)
Discussion started by: bong02
1 Replies

4. IP Networking

FreeBSD and two NICs

FreeBSD 4.8, Apache 1.3.27 - two NICs, one with a real-world IP plugged into a switch outside the PIX firewall, the other with a private IP plugged into a switch inside the PIX firewall. Apache listens on both IPs. my domain is mydomain.org. so in /etc/rc.conf i have something like this (these... (10 Replies)
Discussion started by: ednix
10 Replies

5. Solaris

How many NICS do I have?

Hi, is there a way in Solaris 8 to determine how many total NIC's say a Sun Sparc box has installed - plumbed or unplumbed - and find out its capable network speeds and MAC address? I know ifconfig -a but that only shows the plumbed and used interfaces. thx cc (2 Replies)
Discussion started by: bigapple100
2 Replies

6. Linux

Two NICs one IP address

I'm looking for a way in RHL 5.1 to use two NICs on one host with two physical IP addresses and map them under one virtual IP address, i.e. NIC 1 10.10.10.1 NIC2 10.10.10.2 VIP 192.168.10.1 Basically I want either one of the NICs to ARP for the VIP. No load balancing required just HA. (2 Replies)
Discussion started by: wschmied
2 Replies

7. IP Networking

Mutiple nics on Freebsd 7.0

I had the pleasure of having a gig nic given to me this week, which also appears on the hardware list of FreeBSD. What I would LIKE to do is: 1). Set my 10/100 nick as the dedicated outside/internet connection with a lan ip of 192.168.1.100 2). Set the gig nick as the dedicated... (2 Replies)
Discussion started by: droolin
2 Replies

8. UNIX for Dummies Questions & Answers

How to find about NICs installed

Hi; Is there a way to determine for sure how many NIC ports installed on my Linux box? I tried to run "lspci" but not sure about the results, it's not clear. Below are the results when i run both "ifconfig" & "lspci" on my Linux box i hope someone can help me finding the actual numbers of... (1 Reply)
Discussion started by: Katkota
1 Replies

9. Solaris

Redirect to same port two NICs?

Dear members, I have to problems ; First ; I need to setup two NICs for a Solaris 10 server. But I could not do that unless giving different names in /etc/hosts file. like : 10.1.1.1 testsolaris1 10.3.1.1 testsolaris2 Second ; After solving first problem I have to setup my... (3 Replies)
Discussion started by: shadowfaxxxx
3 Replies

10. IP Networking

Networking 2 NICs

Hi all, Host - Ubuntu 12.04 desktop 64bit Virtualizer - Oracle VirtualBox 2 NICs Where can I find relevant document to set up 2 NICs, one for inward bound and another for outward bound, separate channel, both connected to the same router Would following document be appropriate for my... (1 Reply)
Discussion started by: satimis
1 Replies
Route classifier in tc(8)					       Linux						 Route classifier in tc(8)

NAME
route - route traffic control filter SYNOPSIS
tc filter ... route [ from REALM | fromif TAG ] [ to REALM ] [ classid CLASSID ] [ action ACTION_SPEC ] DESCRIPTION
Match packets based on routing table entries. This filter centers around the possibility to assign a realm to routing table entries. For any packet to be classified by this filter, a routing table lookup is performed and the returned realm is used to decide on whether the packet is a match or not. OPTIONS
action ACTION_SPEC Apply an action from the generic actions framework on matching packets. classid CLASSID Push matching packets into the class identified by CLASSID. from REALM fromif TAG Perform source route lookups. TAG is the name of an interface which must be present on the system at the time of tc invocation. to REALM Match if normal (i.e., destination) routing returns the given REALM. EXAMPLES
Consider the subnet 192.168.2.0/24 being attached to eth0: ip route add 192.168.2.0/24 dev eth0 realm 2 The following route filter will then match packets from that subnet: tc filter add ... route from 2 classid 1:2 and pass packets on to class 1:2. NOTES
Due to implementation details, realm values must be in a range from 0 to 255, inclusive. Alternatively, a verbose name defined in /etc/iproute2/rt_realms may be given instead. SEE ALSO
tc(8), ip-route(8) iproute2 21 Oct 2015 Route classifier in tc(8)
All times are GMT -4. The time now is 01:30 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy