Score:0

about assigning ip's in a network

US flag
jim

Ok I have the isp to a router called router 1 first ten ip's reserved so the dhcp pool is 10 an above. (hence network 1)

then the network goes to a router 2 which is staticed to the first router with the second router setup like the router 1 (first ten ip's reserved the rest for the pool) (hence network 2)

I want to run a server (using ubuntu server o.s) behind the router 2 (remember this router is static ip to the first router)

My question is if i want to static ip on the server into the network how my i achieve this

do i use the second routers ip's configs to setup the (server static ip and subnet...etc) or do i config the servers static ip to the first router configs.

thank you

ru flag
Where does the server sit? Behind Router 1 or behind Router 2? If it's behind Router 2, then you need to set up static addressing in Router 2's private IP space for the server.
jim avatar
md
jim
sorry new here learning to navigate the site still...it is behind router 2...so the next piece of info i need is while installing the server o.s. it gives the option to setup the static i.p then...it asks for subnet ,address, gateway, name server, and search domains
jim avatar
md
jim
i know what the gateway will be 1st ip of router 1, dont know what the rest would be for subnet ,address, name server, and search domains
ar flag
I recommend you disable DHCP in router 2. Do not use the WAN port of router 2 to connect to router 1. Use one of the LAN ports of router 2 to connect to a LAN port of router 1. Essentially router 2 will be a switch. In the Ubuntu server assign one of the first 10 IP address from router 1. Gateway will be router 1.
raj avatar
cn flag
raj
@user68186 We don't know if the OP wants to keep two different networks (in that case the router is needed), or he can have one large network (in that case your solution with a switch is better).
ar flag
@raj I agree that we don't know, but OP says in comments above: *"I know what the gateway will be 1st ip of router 1"*. This won't work if OP has two networks with two different subnets as computers in two subnets typically don't communicate with each other. Also if this server is to be accessed from outside these networks, one will need to setup NAT twice in the two routers.
raj avatar
cn flag
raj
@user68186 So I corrected him that the gateway will be router2 in his setup. Also if router2 allows to turn off NAT, and router1 allows to set additional static route to network2 via router2, you don't need NAT on router2, you can have true routing between network1 and network2 (that's what I would prefer)
Score:0
cn flag
raj

You have two options:

  1. you can configure a static address assignment for the server in router 2 (since the server sits behind router 2) - I tend to call this option "pseudo-static" as the address is still assigned dynamically to the server (using DHCP), only it's the same address each time
  2. use a "true static" configuration, that is, configure a static IP address on the server itself (plus netmask, routing etc. - everything that is needed) - it should be within first ten reserved addresses on router2, so it doesn't collide with the DHCP pool
jim avatar
md
jim
Ok so let me understand this when setting up the static ip on the server it asks for subnet: not sure what goes here???...next it asks for address: which is one of the reserved i.p.'s on router 2...the its asks for gateway: which is routers 1 default ip going out to the internet...then it asks for name servers: and search domains: which or what????...this is where i am lost
jim avatar
md
jim
Thanks for the time I got the name server and search domains figured out I am still not sure of what the subnet field is requiring for an input
raj avatar
cn flag
raj
"subnet" is probably in fact "subnet mask"; the same that your router uses for network2 (probably 255.255.255.0 but check it). Gateway is router 2 address in network2, as this is the address the server will use to connect to the Internet.
raj avatar
cn flag
raj
Of course if you follow user68186's advice and use router2 as switch only, then gateway will be router1, and also the IP address must be from router1 reserved space, because router2 is insignificant in that case.
ru flag
@raj No, in the server installer Subnet is the network mask you're in, it allows for auto-calculation of broadcast address and routes for the configuration once the gateway is provided. I.E. if your router is 192.168.1.0 through 192.168.1.255 the subnet is `192.168.1.0/24`. This is *not* the mask which is the CIDR.
I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.