Please describe your network in a little more detail — you have two Mac systems. What sort of local network are these connected to; WiFi or wired network? Is this a home or school or business network?
I'll make some assumptions with the following...
Are you on a private (home) network, or are you on a school or business network?
If you are on a private (home) network...
- Please shut off any of the web proxy settings that may have been enabled here. Those settings are unrelated to the configuration typical private (home) networks.
- Use DHCP-assigned settings only. Don't self-assign IP addresses.
If you're on a school or business network, please contact the organization's IT folks for assistance with setting up your Mac systems.
Are you on a WiFi network? (I'm guessing you are, based on your descriptions.)
If you are in an apartment building, or have neighbors or businesses located within a hundred meters or so, or are in some other sort of densely-populated area, and if you are using WiFi to connect to the Internet, then it is possible that you're experiencing the effects of WiFi interference. Too many WiFi routers in too small a space can cause problems similar to what you are describing. If so and if your ISP-provided gateway has the option (and many do), connect directly to the gateway device via an Ethernet cable from your Mac, as a test. See if that works more reliably.
Use DHCP. Save for specific networking configurations, please do not self-assign IP addresses when DHCP is available. Please don't pick random IP addresses. Even once you're familiar with the local network layout and with how IP routing works, it's still usually easier and better to use the DHCP-assigned addresses and DHCP-assigned DNS services and DHCP-assigned gateway router addresses.