You are not logged in.

#1 2014-05-14 07:19:01

curtlee2002
Member
Registered: 2010-04-14
Posts: 4

[SOLVED] netctl DHCP IP (client) and Static IP on a single interface

Description="enp1s0"
Interface=enp1s0
Connection=ethernet
IP=dhcp
DNS=('127.0.0.1')

I have a server I have configured as a NATed router.  enp1s0 is assigned a public ip via my modem, but I also want to add a 192.168.100.0/24 address so I can configure the modem.  I read the netctl.profile manual, but didn't see a way to configure it this way.

Would adding this be the proper way to do this?

IPCustom=('ip address add 192.168.100.2/24 dev enp1s0')

Thank You For Your Time

Last edited by curtlee2002 (2014-05-16 06:29:30)

Offline

#2 2014-05-14 16:43:46

ewaller
Administrator
From: Pasadena, CA
Registered: 2009-07-13
Posts: 20,354

Re: [SOLVED] netctl DHCP IP (client) and Static IP on a single interface

If I understand, you have a system that is being used as a router; presumably this means there are at least two Ethernet interfaces.  The one(s) that face your private network are not relevant to this issue.

The interface that faces the internet receives a public IP as apposed to a private address like 192.168.x.x.  In this case, the address is not being provided by the modem.  It is being provided by your ISP, and the modem is in Bridge mode.   If this is the case, I do not believe you can communicate with the modem.  In bridge mode, it acts as a dumb pass through.

Other modems handle the communication with the ISP and obtain a public IP for themselves, and then provide NAT to a private network behind the modem.  If this is the case, the address your Arch server gets will really be a 192.168.x.x (or 172.x.x.x, or 10.x.x.x) address.   In this case, you can talk to the web server in the modem, but you should not need a static address.  The modem should provide a dynamic address on its private network side, regardless as to whether it has established an upstream connection.

Can you verify what the IP assigned to your Box is?  You do not need to share it, just provide the first octet.


Nothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael Faraday
Sometimes it is the people no one can imagine anything of who do the things no one can imagine. -- Alan Turing
---
How to Ask Questions the Smart Way

Offline

#3 2014-05-14 17:25:09

curtlee2002
Member
Registered: 2010-04-14
Posts: 4

Re: [SOLVED] netctl DHCP IP (client) and Static IP on a single interface

ewaller, I can add a 192.168.100.0/24 address and connect to the modem even-though the modem is acting as a bridge.

So is my solution the best way to add a static ip or not?  I didn't see any other way in the manual.

Offline

#4 2014-05-14 17:33:44

ewaller
Administrator
From: Pasadena, CA
Registered: 2009-07-13
Posts: 20,354

Re: [SOLVED] netctl DHCP IP (client) and Static IP on a single interface

Well, in that case adding a static address should work.  That is pretty cool, all the modems I have encountered were not that well designed.


Nothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael Faraday
Sometimes it is the people no one can imagine anything of who do the things no one can imagine. -- Alan Turing
---
How to Ask Questions the Smart Way

Offline

#5 2014-05-16 06:29:05

curtlee2002
Member
Registered: 2010-04-14
Posts: 4

Re: [SOLVED] netctl DHCP IP (client) and Static IP on a single interface

ewaller, Arris (Motorola) SB6121.

Since no one has stated a different way to do this, I'll mark as [SOLVED].  I just figured I had missed something in the manual.

Offline

Board footer

Powered by FluxBB