You are not logged in.

#1 2008-01-30 15:44:16

Shaika-Dzari
Member
From: Québec, Canada
Registered: 2006-04-14
Posts: 436
Website

[netcfg2] Static IP configuration problem [solved]

Hello everyone!

I need to connect to 3 differents networks:

- Home : dhcp
- School lab : static IP and dns
- School wifi : wireless dhcp

I have no problem at home with a simple configuration but I am unable to connect in my school lab (I did not test the wifi yet).

Some info:
- I must use IP 10.1.1.116
- The gateway is 10.1.1.1
- I have 2 dns adress to provide

I tried with this profile but I can't obtain any IP adress from the router:

CONNECTION="ethernet"
DESCRIPTION="A less basic ethernet profile, using static configuration"
INTERFACE=eth0
IP="10.1.1.116"
IFOPTS="10.1.1.116 netmask 255.255.255.0 broadcast 10.1.1.255"
GATEWAY="10.1.1.1"
DNS1="192.26.210.1"
DNS2="192.26.210.8"

My rc.conf:

...
######################################################################
# Mod.
#lo="lo 127.0.0.1"
#eth0="eth0 192.168.0.2 netmask 255.255.255.0 broadcast 192.168.0.255"
#eth0="dhcp"
#INTERFACES=(lo eth0 !eth1)
######################################################################
NETWORKS=(ethernet-static)
#
# Routes to start at boot-up (in this order)
# Declare each route then list in ROUTES
#   - prefix an entry in ROUTES with a ! to disable it
#
#gateway="default gw 192.168.0.1"
#gateway="default gw 10.1.1.1"
#ROUTES=(!gateway)
#
...

Please help me, I need this connection to work at school with apache/php/mysql. neutral

@+

Last edited by Shaika-Dzari (2008-02-01 15:34:51)

Offline

#2 2008-01-30 16:00:28

lilsirecho
Veteran
Registered: 2003-10-24
Posts: 5,000

Re: [netcfg2] Static IP configuration problem [solved]

The listings you have are confusing...it isn't apparent that the items are not commented out.

The static IP must have a gateway that is related to the same IP number but with  ".1" as the last number.

Then you must remove the ! from gateway.

Then the DNS in resolv.conf is required for ISP connection.

I am  sure that DHCP will not work with a static IP assigned.


Prediction...This year will be a very odd year!
Hard work does not kill people but why risk it: Charlie Mccarthy
A man is not complete until he is married..then..he is finished.
When ALL is lost, what can be found? Even bytes get lonely for a little bit!     X-ray confirms Iam spineless!

Offline

#3 2008-01-30 16:05:55

Shaika-Dzari
Member
From: Québec, Canada
Registered: 2006-04-14
Posts: 436
Website

Re: [netcfg2] Static IP configuration problem [solved]

Hello!

it isn't apparent that the items are not commented out.

Every line in my rc.conf is commented because I use netcfg2 to connect. neutral
I'm not sure I understand what you want me to do...
Must I only remove commented before?

#ROUTES=(!gateway)

In my netcfg2 profile above there are the gateway, IP and dns settings.

Thank
@+

Last edited by Shaika-Dzari (2008-01-30 16:07:24)

Offline

#4 2008-01-30 16:23:48

lilsirecho
Veteran
Registered: 2003-10-24
Posts: 5,000

Re: [netcfg2] Static IP configuration problem [solved]

The gateway required for static IP must have the ! removed from  ROUTES=(!gateway)

AFAIK you cannot have two gateways.

If you are using a router, it has an IP and it must be in the loop and usually defines an IP for static IP 's which is greater than the upper limit for IP assigns.

You may have to contact the DNS server for advice.


Prediction...This year will be a very odd year!
Hard work does not kill people but why risk it: Charlie Mccarthy
A man is not complete until he is married..then..he is finished.
When ALL is lost, what can be found? Even bytes get lonely for a little bit!     X-ray confirms Iam spineless!

Offline

#5 2008-01-30 16:35:44

byte
Member
From: Düsseldorf (DE)
Registered: 2006-05-01
Posts: 2,046

Re: [netcfg2] Static IP configuration problem [solved]


1000

Offline

#6 2008-01-30 16:47:51

lilsirecho
Veteran
Registered: 2003-10-24
Posts: 5,000

Re: [netcfg2] Static IP configuration problem [solved]

Byte:

Thanks for the info...wasn't aware of the new format...never a dull moment!!!!!!

Will withdraw from this post and regroup!!


Prediction...This year will be a very odd year!
Hard work does not kill people but why risk it: Charlie Mccarthy
A man is not complete until he is married..then..he is finished.
When ALL is lost, what can be found? Even bytes get lonely for a little bit!     X-ray confirms Iam spineless!

Offline

#7 2008-01-30 19:34:23

tomk
Forum Fellow
From: Ireland
Registered: 2004-07-21
Posts: 9,839

Re: [netcfg2] Static IP configuration problem [solved]

Standard netwrorking advice: set it up manually first with ifconfig. That way you will see any error responses and you will hopefully be able to fix them.

Once you're happy with that, adjust the profile if necessary and try again.

Offline

#8 2008-02-01 02:07:36

Shaika-Dzari
Member
From: Québec, Canada
Registered: 2006-04-14
Posts: 436
Website

Re: [netcfg2] Static IP configuration problem [solved]

Hello tomk! smile

I did what you tell me and I was able to connect with ifconfig.

This two command work:

ifconfig eth0 "10.1.1.116 netmask 255.255.255.0" up
route add default gw "10.1.1.1"

I hack a little into netcfg2 and found my error.

The line IP="" must be dhcp or static and must not be the Ip you want to use... roll

But netcfg2 gave me no errors so I think I will fill a bug.

Edit: http://bugs.archlinux.org/task/9423

@+

Last edited by Shaika-Dzari (2008-02-01 02:43:42)

Offline

#9 2008-02-01 11:28:34

iphitus
Forum Fellow
From: Melbourne, Australia
Registered: 2004-10-09
Posts: 4,927

Re: [netcfg2] Static IP configuration problem [solved]

Thanks for the patch, will merge in next release.

Offline

#10 2008-02-01 15:34:29

Shaika-Dzari
Member
From: Québec, Canada
Registered: 2006-04-14
Posts: 436
Website

Re: [netcfg2] Static IP configuration problem [solved]

You're welcome iphitus smile

Offline

Board footer

Powered by FluxBB