LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 02-20-2014, 10:25 AM   #1
johnmaxwell
LQ Newbie
 
Registered: Feb 2014
Posts: 20

Rep: Reputation: Disabled
quagga static route


i have installed quagga and configured a little.

!
! Zebra configuration saved from vty
! 2014/02/20 20:54:51
!
hostname ngo.add.bd.com
password 8 UY/KHnzvDXFLo
enable password 8 nDNgqHEpYkJXQ
service password-encryption
!
interface Auto_eth1
link-detect
ip address 192.168.10.1/24
ipv6 nd suppress-ra
!
interface eth0
link-detect
ip address 115.127.27.59/29
ipv6 nd suppress-ra
!
interface list
ipv6 nd suppress-ra
!
interface lo
!
interface virbr0
ipv6 nd suppress-ra
!
interface virbr0-nic
ipv6 nd suppress-ra
!
interface wlan0
ipv6 nd suppress-ra
!
!
!
line vty
!

my usb ethernet card details
TYPE=Ethernet
BOOTPROTO=none
DEFROUTE=yes
IPV4_FAILURE_FATAL=yes
IPV6INIT=no
NAME="Auto eth1"
UUID=d0b507ad-dd09-4957-95e0-0223e9f2c0ee
ONBOOT=yes
NETMASK=255.255.255.0
DEVICE=Auto_eth1
USERCTL=no
IPADDR=192.168.10.1
GATEWAY=192.168.10.1
DNS1=202.168.254.4
DNS2=202.168.254.8
PREFIX=24
HWADDR=00:141:B0:B5:28
LAST_CONNECT=1392908218

my bulitin ethernet card details
DEVICE=eth0
TYPE=Ethernet
UUID=9f432fb9-6f50-4079-929c-a749850fc161
ONBOOT=yes
NM_CONTROLLED=yes
BOOTPROTO=none
IPADDR=115.127.27.59
PREFIX=29
GATEWAY=115.127.27.57
DNS1=202.168.254.4
DNS2=202.168.254.8
DEFROUTE=yes
IPV4_FAILURE_FATAL=yes
IPV6INIT=no
NAME="System eth0"
HWADDR=a0:b3:cc:c0:e8:2e
LAST_CONNECT=1392639203
USERCTL=no

#route -n command output

Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
115.127.27.56 0.0.0.0 255.255.255.248 U 1 0 0 eth0
192.168.122.0 0.0.0.0 255.255.255.0 U 0 0 0 virbr0
0.0.0.0 115.127.27.57 0.0.0.0 UG 0 0 0 eth0


[root@ngo ~]# service iptables status
Table: filter
Chain INPUT (policy ACCEPT)
num target prot opt source destination
1 ACCEPT all -- 0.0.0.0/0 0.0.0.0/0 state RELATED,ESTABLISHED
2 ACCEPT icmp -- 0.0.0.0/0 0.0.0.0/0
3 ACCEPT all -- 0.0.0.0/0 0.0.0.0/0
4 ACCEPT udp -- 0.0.0.0/0 224.0.0.251 state NEW udp dpt:5353
5 ACCEPT udp -- 0.0.0.0/0 0.0.0.0/0 state NEW udp dpt:137
6 ACCEPT udp -- 0.0.0.0/0 0.0.0.0/0 state NEW udp dpt:138
7 ACCEPT tcp -- 0.0.0.0/0 0.0.0.0/0 state NEW tcp dpt:139
8 ACCEPT tcp -- 0.0.0.0/0 0.0.0.0/0 state NEW tcp dpt:445
9 ACCEPT udp -- 0.0.0.0/0 0.0.0.0/0 state NEW udp dpt:137
10 ACCEPT udp -- 0.0.0.0/0 0.0.0.0/0 state NEW udp dpt:138
11 ACCEPT tcp -- 0.0.0.0/0 0.0.0.0/0 state NEW tcp dpt:22
12 ACCEPT udp -- 0.0.0.0/0 0.0.0.0/0 state NEW udp dpt:631
13 ACCEPT tcp -- 0.0.0.0/0 0.0.0.0/0 state NEW tcp dpt:631
14 ACCEPT udp -- 0.0.0.0/0 0.0.0.0/0 state NEW udp dpt:631
15 ACCEPT tcp -- 0.0.0.0/0 0.0.0.0/0 state NEW tcp dpt:23
16 ACCEPT udp -- 0.0.0.0/0 0.0.0.0/0 state NEW udp dpt:23
17 ACCEPT tcp -- 0.0.0.0/0 0.0.0.0/0 state NEW tcp dpt:2601
18 ACCEPT udp -- 0.0.0.0/0 0.0.0.0/0 state NEW udp dpt:2601
19 REJECT all -- 0.0.0.0/0 0.0.0.0/0 reject-with icmp-host-prohibited

Chain FORWARD (policy ACCEPT)
num target prot opt source destination
1 REJECT all -- 0.0.0.0/0 0.0.0.0/0 reject-with icmp-host-prohibited

Chain OUTPUT (policy ACCEPT)
num target prot opt source destination


i can not route a packet from 192.168.10.0/24 though Auto_eth1 to eth0

Any help.

Thanks
 
Old 02-21-2014, 05:54 PM   #2
Ser Olmy
Senior Member
 
Registered: Jan 2012
Distribution: Slackware
Posts: 2,404

Rep: Reputation: Disabled
Quote:
Originally Posted by johnmaxwell View Post
Chain FORWARD (policy ACCEPT)
num target prot opt source destination
1 REJECT all -- 0.0.0.0/0 0.0.0.0/0 reject-with icmp-host-prohibited
All packets not destined for the local host are processed by the FORWARD chain in the filter table, and your FILTER chain contains a rule blocking everything.

(BTW, why are you using Quagga to configure static routing? Are you planning to use a routing protocol in the future? Oh, and please use [code] tags in the future.)
 
Old 02-23-2014, 01:33 AM   #3
johnmaxwell
LQ Newbie
 
Registered: Feb 2014
Posts: 20

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by Ser Olmy View Post
All packets not destined for the local host are processed by the FORWARD chain in the filter table, and your FILTER chain contains a rule blocking everything.

(BTW, why are you using Quagga to configure static routing? Are you planning to use a routing protocol in the future? Oh, and please use [code] tags in the future.)
Then what can i do?

My plan is to use a linux machine as a router, dns server, ftp server, web server, dhcp server for my local private ip block.

Waht is you suggestion?

Please help.
 
Old 02-24-2014, 03:40 AM   #4
Ser Olmy
Senior Member
 
Registered: Jan 2012
Distribution: Slackware
Posts: 2,404

Rep: Reputation: Disabled
All you need to do in order to set up a router is to configure IP addresses on each interface and activate IP forwarding. You can do this manually by writing a "1" to /proc/sys/net/ipv4/ip_forward (running echo 1 > /proc/sys/net/ipv4/ip_forward from the command line would work). Most distributions do this at bootup if you add the right setting to a configuration file or startup script.

Also, the iptables FORWARD chain must allow the traffic to be forwarded. You could alter the ruleset manually with the iptables command, but again, most Linux distributions store the iptables ruleset somewhere and load it automatically at bootup.

Which distribution are you using?
 
Old 02-24-2014, 12:07 PM   #5
johnmaxwell
LQ Newbie
 
Registered: Feb 2014
Posts: 20

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by Ser Olmy View Post
All you need to do in order to set up a router is to configure IP addresses on each interface and activate IP forwarding. You can do this manually by writing a "1" to /proc/sys/net/ipv4/ip_forward (running echo 1 > /proc/sys/net/ipv4/ip_forward from the command line would work). Most distributions do this at bootup if you add the right setting to a configuration file or startup script.

Also, the iptables FORWARD chain must allow the traffic to be forwarded. You could alter the ruleset manually with the iptables command, but again, most Linux distributions store the iptables ruleset somewhere and load it automatically at bootup.

Which distribution are you using?
I am using redhat.

And i want to use quagga because later on i have to connect other router.

and what about the dns server in the local lan. what to write in resolve.conf file.
 
Old 02-24-2014, 12:36 PM   #6
Ser Olmy
Senior Member
 
Registered: Jan 2012
Distribution: Slackware
Posts: 2,404

Rep: Reputation: Disabled
Then check the Red Hat documentation for your version to find where it stores the iptables rule set and the IP forwarding setting. You'll need to correct these settings before you can install Quagga.

Quagga is just a series of daemons you install on top of an already functioning router. Sure, you CAN store the IP settings for each interface and any static routes in the config file for the "zebra" daemon, but you don't have to. In other words, "zebra.conf" can be left with just the default settings.

Once the Red Hat host is a functioning router, you can configure the routing protocol of your choice. Each protocol has a separate Quagga daemon, and the configuration for each daemon does not touch the existing interface or IP forwarding settings. All these daemons do, is import and export information between the internal routing table and the routing protocol in question.

There's no way I can tell you what you should put in your resolv.conf, since I don't know which DNS server you wish to use. Your NIC configuration contains the following:
Code:
DNS1=202.168.254.4
DNS2=202.168.254.8
...which means the Red Hat init system will put two "nameserver" entries with these IP addresses in your resolv.conf at bootup.

(By the way, both your NIC config files contain "GATEWAY" entries, and one points back to the host itself. This is wrong, and before you proceed with setting up a router, you should make sure you understand why it is.)
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
route-eth - Adding a static route gbwien Linux - Networking 5 02-24-2012 06:15 AM
BGP with Quagga and static routing suggestions crazynp Linux - Networking 1 06-23-2011 02:11 PM
Static Route Gets Ignored jfmorales Red Hat 2 10-29-2010 07:44 PM
Quagga default route not showing in kernel default route (netstat -nr) Valkyr1e Linux - Networking 3 08-03-2008 10:20 PM
static route dvong3 Linux - Networking 1 01-25-2006 05:42 PM


All times are GMT -5. The time now is 03:14 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration