Week 1: Networking Challenge

Week 1: Networking Challenge

ยท

4 min read

๐ŸŒ Week 1: Networking Challenge - Letโ€™s Learn the Basics of the Internet! ๐Ÿš€

Hey there! ๐Ÿ‘‹ Welcome to Week 1 of our DevOps 90 Days Challenge. This week, we're going to talk about Networking. Don't worry! It's just how computers talk to each other, like how you chat with your friends on the phone or play games online. ๐ŸŽฎ

Letโ€™s break it down step-by-step, nice and easy! โœจ


1. What is the OSI Model? ๐Ÿ“ฆ

Think of the OSI Model as a special set of instructions that shows how your computer sends messages through the internet. ๐Ÿ’Œ

There are 7 layers (or steps) in this model. Each layer has a job to do before the message gets to its destination.

  • Layer 1: Physical Layer โ€“ Imagine this is the wire or Wi-Fi that sends messages. ๐Ÿ”Œ๐Ÿ“ถ

  • Layer 2: Data Link Layer โ€“ This is like the delivery driver that carries your message. ๐Ÿšš

  • Layer 3: Network Layer โ€“ This is the map that shows where the message needs to go. ๐Ÿ—บ๏ธ

  • Layer 4: Transport Layer โ€“ Think of this as the bus that makes sure the message goes to the right place. ๐ŸšŒ

  • Layer 5: Session Layer โ€“ This keeps track of your conversations. Like, you wouldnโ€™t want to forget who youโ€™re talking to! ๐Ÿ—ฃ๏ธ

  • Layer 6: Presentation Layer โ€“ This layer makes sure the message is readable (like a letter being written clearly). โœ๏ธ

  • Layer 7: Application Layer โ€“ This is where the apps you use (like Facebook or YouTube) work! ๐Ÿ“ฑ


2. What Are Protocols and Ports? ๐Ÿ“ก

Now letโ€™s talk about protocols. Protocols are like rules that computers use to talk to each other. Each protocol has a port number (like a house number) where it lives. Here are some examples:

  • HTTP (Port 80) โ€“ This is for regular websites. Itโ€™s like when you visit a fun site online. ๐ŸŒ

  • HTTPS (Port 443) โ€“ This is for secure websites, like when you log in to your bank online. It keeps things safe. ๐Ÿ”

  • FTP (Port 21) โ€“ This helps computers send files to each other, like sending pictures or videos. ๐Ÿ“‚

  • SSH (Port 22) โ€“ This helps you talk to another computer far away, like youโ€™re chatting with a robot! ๐Ÿค–

  • DNS (Port 53) โ€“ This helps computers figure out what website you're looking for (like when you type in google.com and it finds the website for you). ๐ŸŒ

3. AWS EC2 and Security Groups ๐Ÿ’ป๐Ÿ”’

Next, letโ€™s learn about AWS EC2. This is like a virtual computer you can use on the internet! Itโ€™s like renting a super-powerful computer from Amazon to run your websites or apps. ๐Ÿš€

Now, we need to secure our EC2 computer so no one can mess with it. Security groups are like guard dogs that make sure only the right people (or computers) can talk to your EC2 computer. ๐Ÿ•โ€๐Ÿฆบ

How to secure your EC2:
Security Groups:

  • These are like virtual firewalls that protect your EC2 instance. You set rules to decide which traffic is allowed in or out (e.g., allowing only web traffic on port 80).

  • For example, if you want to allow SSH (port 22) to connect to your EC2 instance, you would set up a rule in the Security Group to let that traffic through.

Step-by-Step Guide:

  1. Log in to your AWS account and navigate to EC2.

  2. Click on โ€œLaunch Instance.โ€

  3. Choose an Amazon Machine Image (AMI), like the free Ubuntu one.

  4. Select the instance type (t2.micro for free tier).

  5. Configure your instance, including networking and security group settings.

  6. Create a new security group and add rules for the ports you need (e.g., HTTP on port 80, SSH on port 22).

  7. Launch the instance, and you can connect to it using SSH or access it via a browser if it's running a web server.

4. Networking Commands ๐Ÿ’ป๐Ÿ”ง

Now, letโ€™s talk about some commands (like instructions for the computer) you can use to check if your internet is working or if something is wrong. โš™๏ธ

Here are some simple ones:

  1. ping โ€“ This checks if you can reach a website. Itโ€™s like saying, โ€œHey, are you there?โ€ ๐Ÿ‘‹

  2. traceroute โ€“ This shows you the path your message takes to reach a website. It's like seeing all the stops your message makes on its way. ๐Ÿš

  3. netstat โ€“ This shows which websites and computers your computer is talking to. ๐Ÿ–ฅ๏ธ๐Ÿ’ฌ

    • Example: netstat
  4. curl โ€“ This helps you check if a website is working. It's like knocking on the door of a website and seeing if anyone answers. ๐Ÿšช

  5. dig or nslookup โ€“ These tools help you find the address of a website, so your computer knows where to go. ๐Ÿ 

ย