Problem to set up nat router with Mageia 3

Problem to set up nat router with Mageia 3

Postby e214679 » Jan 18th, '14, 06:33

I set up a router with Mageia 3.
1. set up eth0 which can start up
Code: Select all
    # cat ifcfg-eth0
       DEVICE=eth0
       BOOTPROTO=static
       IPADDR=xxx.xxx.xxx.xxx
       NETMASK=255.255.255.252
       GATEWAY=xxx.xxx.xxx.xxx
       ONBOOT=yes
       METRIC=10
       MII_NOT_SUPPORTED=no
       USERCTL=no
       DNS1=xxx.xxx.xxx.xxx
       DNS2=xxx.xxx.xxx.xxx
       RESOLV_MODS=no
       IPV6INIT=no
       IPV6TO4INIT=no
       ACCOUNTING=no
       NM_CONTROLLED=no


2. set up eth1 which cannot start
Code: Select all
    # cat ifcfg-eth1
       DEVICE=eth1
       BOOTPROTO=static
       IPADDR=10.0.0.10
       NETMASK=255.255.255.0
       ONBOOT=yes


after I restart the network with "/etc/init.d/network restart"
It seen all thing ok. But I check it with ifconfig. the eth1 cannot start

Code: Select all
# /etc/init.d/network restart
Restarting network (via systemctl):                                                    [  OK  ]



Code: Select all
# ifconfig
eth0      Link encap:Ethernet  HWaddr 00:00:00:00:00:00
          inet addr:xxx.xxx.xxx.xxx  Bcast:xxx.xxx.xxx.xxx  Mask:255.255.255.252
          inet6 addr: ff80::226:77ff:fe8b:6f30/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:549142 errors:0 dropped:0 overruns:0 frame:0
          TX packets:339925 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:677840989 (646.4 MiB)  TX bytes:90667806 (86.4 MiB)

eth1      Link encap:Ethernet  HWaddr 00:00:00:00:00:00
          UP BROADCAST MULTICAST  MTU:1500  Metric:1
          RX packets:212882 errors:0 dropped:0 overruns:0 frame:0
          TX packets:456464 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000
          RX bytes:18262059 (17.4 MiB)  TX bytes:665314136 (634.4 MiB)

lo        Link encap:Local Loopback
          inet addr:127.0.0.1  Mask:255.0.0.0
          inet6 addr: ::1/128 Scope:Host
          UP LOOPBACK RUNNING  MTU:65536  Metric:1
          RX packets:1146 errors:0 dropped:0 overruns:0 frame:0
          TX packets:1146 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:0
          RX bytes:120784 (117.9 KiB)  TX bytes:120784 (117.9 KiB)


If I start it with " ifup eth1" it can be started.

Please help how to solve this problem, Thanks!
Last edited by doktor5000 on Jan 18th, '14, 09:50, edited 1 time in total.
Reason: added code tags, to improve on clarity
e214679
 
Posts: 7
Joined: Sep 28th, '12, 04:59

Re: Problem to set up nat router with Mageia 3

Postby wintpe » Jan 19th, '14, 20:21

make sure nm_controled is also set to no on eth1

also if this is to be a router you will want ip_forwding switched on

this is done through sysctl.conf

to find the setting you need run sysctl -a|grep forward

then add those entries to /etc/sysctl.conf with there settings chnaged to what you want.

but thats not related to your problem, just something else you may need.

regards peter
Redhat 6 Certified Engineer (RHCE)
Sometimes my posts will sound short, or snappy, however its realy not my intention to offend, so accept my apologies in advance.
wintpe
 
Posts: 1204
Joined: May 22nd, '11, 17:08
Location: Rayleigh,, Essex , UK


Return to Networking

Who is online

Users browsing this forum: No registered users and 1 guest

cron